函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\hugetlb.c Create Date:2022-07-27 16:56:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static long add_reservation_in_range(struct resv_map *resv, long f, long t, bool count_only)

返回类型:long

参数:

类型参数名称
struct resv_map *resv
longf
longt
boolcount_only
255  chg等于0
256  head等于regions
257  struct file_region * rg = NULL, * trg = NULL, * nrg = NULL
260  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)
261  如果f小于等于to退出
265  如果f大于fromf等于from
268  chg等于tf
271  nrg等于rg
273  如果link恒等于head退出
275  如果from大于t退出
282  如果to大于t
283  chg加等于tot
284  t等于to
286  chg减等于tofrom
288  如果非count_onlyrg不等于nrg
289  删除链表项
290  释放内存
294  如果非count_only
295  from等于f
296  to等于t
299  返回:chg
调用者
名称描述
region_addAdd the huge page range represented by [f, t) to the reserve* map
region_chgExamine 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