函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:memcg_expand_one_shrinker_map

函数原型:static int memcg_expand_one_shrinker_map(struct mem_cgroup *memcg, int size, int old_size)

返回类型:int

参数:

类型参数名称
struct mem_cgroup *memcg
intsize
intold_size
328  lockdep_assert_held( & memcg_shrinker_map_mutex)
330  for_each_node(nid)
331  old等于cu_dereference_protected() - fetch RCU pointer when updates prevented*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Return the value of the specified RCU-protected pointer, but omit(shrinker_map, true)
334  如果非old则返回:0
337  new等于kvmalloc(new的长度 + size, GFP_KERNEL)
338  如果非new则返回:负ENOMEM
342  memset(map, (int)0xff, old_size)
343  memset((void * )map + old_size, 0, size - old_size)
345  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(shrinker_map, new)
346  Post an RCU callback to be invoked after the end of an RCU grace* period. But since we have but one CPU, that would be after any* quiescent state.
349  返回:0
调用者
名称描述
memcg_expand_shrinker_maps