Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memcontrol.c Create Date:2022-07-28 16:08:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:memcg_expand_one_shrinker_map

Proto:static int memcg_expand_one_shrinker_map(struct mem_cgroup *memcg, int size, int old_size)

Type:int

Parameter:

TypeParameterName
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  If Not old Then Return 0
337  new = kvmalloc( size of new + size, GFP_KERNEL)
338  If Not new Then Return -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  Return 0
Caller
NameDescribe
memcg_expand_shrinker_maps