函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:memcg_expand_shrinker_maps

函数原型:int memcg_expand_shrinker_maps(int new_id)

返回类型:int

参数:

类型参数名称
intnew_id
396  ret等于0
399  size等于DIV_ROUND_UP(new_id + 1, BITS_PER_LONG)乘sizeof(unsignedlong)
400  old_size等于memcg_shrinker_map_size
401  如果size小于等于old_size则返回:0
404  mutex_lock( & memcg_shrinker_map_mutex)
405  如果非root_mem_cgroup则转到:unlock
409  如果mem_cgroup_is_root(memcg)则继续下一循环
411  ret等于memcg_expand_one_shrinker_map(memcg, size, old_size)
412  如果ret
413  mem_cgroup_iter_break - abort a hierarchy walk prematurely*@root: hierarchy root*@prev: last visited hierarchy member as returned by mem_cgroup_iter()
414  转到:unlock
417  unlock :
418  如果非retmemcg_shrinker_map_size等于size
420  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
421  返回:ret
调用者
名称描述
prealloc_memcg_shrinker