函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-27 15:40:58
Last Modify:2022-05-23 13:41:30 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:prealloc_memcg_shrinker

函数原型:static int prealloc_memcg_shrinker(struct shrinker *shrinker)

返回类型:int

参数:

类型参数名称
struct shrinker *shrinker
221  ret等于负ENOMEM
223  lock for writing
225  id等于dr_alloc() - Allocate an ID.*@idr: IDR handle.*@ptr: Pointer to be associated with the new ID.*@start: The minimum ID (inclusive).*@end: The maximum ID (exclusive).*@gfp: Memory allocation flags.
226  如果id小于0则转到:unlock
229  如果id大于等于shrinker_nr_max
230  如果memcg_expand_shrinker_maps(id)则
232  转到:unlock
235  shrinker_nr_max等于id加1
237  ID in shrinker_idr 等于id
238  ret等于0
239  unlock :
240  lease a write lock
241  返回:ret
调用者
名称描述
prealloc_shrinkerAdd a shrinker callback to be called from the vm.