Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\hugetlb.c Create Date:2022-07-28 15:25:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Examine the existing reserve map and determine how many* huge pages in the specified range [f, t) are NOT currently* represented. This routine is called before a subsequent* call to region_add that will actually modify the reserve

Proto:static long region_chg(struct resv_map *resv, long f, long t)

Type:long

Parameter:

TypeParameterName
struct resv_map *resv
longf
longt
372  chg = 0
374  spin_lock( & lock)
375  retry_locked :
376  adds_in_progress++
382  If adds_in_progress > region_cache_count Then
385  VM_BUG_ON(adds_in_progress - region_cache_count > 1)
387  adds_in_progress--
388  spin_unlock( & lock)
390  trg = kmalloc( size of trg , GFP_KERNEL)
391  If Not trg Then Return -ENOMEM
394  spin_lock( & lock)
395  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
396  region_cache_count++
397  Go to retry_locked
400  chg = Must be called with resv->lock held. Calling this with count_only == true* will count the number of pages to be added but will not modify the linked* list.
402  spin_unlock( & lock)
403  Return chg
Caller
NameDescribe
__vma_reservation_common
hugetlb_reserve_pages