Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:memcg_expand_shrinker_maps

Proto:int memcg_expand_shrinker_maps(int new_id)

Type:int

Parameter:

TypeParameterName
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  If size <= old_size Then Return 0
404  mutex_lock( & memcg_shrinker_map_mutex)
405  If Not root_mem_cgroup Then Go to unlock
409  If mem_cgroup_is_root(memcg) Then Continue
411  ret = memcg_expand_one_shrinker_map(memcg, size, old_size)
412  If ret Then
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  Go to unlock
417  unlock :
418  If Not ret Then memcg_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  Return ret