Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Add the huge page range represented by [f, t) to the reserve* map

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

Type:long

Parameter:

TypeParameterName
struct resv_map *resv
longf
longt
314  head = regions
316  add = 0
318  spin_lock( & lock)
320  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(rg, head, link)
321  If f <= to Then Break
329  If link == head || t < from Then
330  VM_BUG_ON(region_cache_count <= 0)
332  region_cache_count--
333  nrg = list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & region_cache, structfile_region, link)
335  deletes entry from list
337  from = f
338  to = t
339  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.
341  add += t - f
342  Go to out_locked
345  add = 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.
347  out_locked :
348  adds_in_progress--
349  spin_unlock( & lock)
350  VM_BUG_ON(add < 0)
351  Return add
Caller
NameDescribe
__vma_reservation_common
hugetlb_reserve_pages