函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

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

返回类型:long

参数:

类型参数名称
struct resv_map *resv
longf
longt
372  chg等于0
374  加自旋锁
375  retry_locked :
376  adds_in_progress自加
382  如果adds_in_progress大于region_cache_count
385  VM_BUG_ON(adds_in_progress - region_cache_count > 1)
387  adds_in_progress自减
388  自旋锁解锁
390  trg等于kmalloc(trg的长度, GFP_KERNEL)
391  如果非trg则返回:负ENOMEM
394  加自旋锁
395  添加链表项
396  region_cache_count自加
397  转到: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  自旋锁解锁
403  返回:chg
调用者
名称描述
__vma_reservation_common
hugetlb_reserve_pages