Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:memcg_alloc_shrinker_maps

Proto:static int memcg_alloc_shrinker_maps(struct mem_cgroup *memcg)

Type:int

Parameter:

TypeParameterName
struct mem_cgroup *memcg
373  ret = 0
375  If mem_cgroup_is_root(memcg) Then Return 0
378  mutex_lock( & memcg_shrinker_map_mutex)
379  size = memcg_shrinker_map_size
380  for_each_node(nid)
381  map = kvzalloc( size of map + size, GFP_KERNEL)
382  If Not map Then
384  ret = -ENOMEM
385  Break
387  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, map)
389  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.
391  Return ret
Caller
NameDescribe
mem_cgroup_css_online