Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-28 14:17:26
Last Modify:2022-05-23 13:41:30 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:shrink_slab - shrink slab caches*@gfp_mask: allocation context*@nid: node whose slab caches to target*@memcg: memory cgroup whose slab caches to target*@priority: the reclaim priority* Call the shrink functions to age shrinkable caches

Proto:static unsigned long shrink_slab(gfp_t gfp_mask, int nid, struct mem_cgroup *memcg, int priority)

Type:unsigned long

Parameter:

TypeParameterName
gfp_tgfp_mask
intnid
struct mem_cgroup *memcg
intpriority
664  freed = 0
674  If Not mem_cgroup_disabled() && Not mem_cgroup_is_root(memcg) Then Return shrink_slab_memcg(gfp_mask, nid, memcg, priority)
677  If Not rylock for reading -- returns 1 if successful, 0 if contention Then Go to out
681  struct shrink_control sc = {gfp_mask = gfp_mask, current node being shrunk (for NUMA aware shrinkers) = nid, current memcg being shrunk (for memcg aware shrinkers) = memcg, }
687  ret = do_shrink_slab( & sc, shrinker, priority)
688  If ret == SHRINK_EMPTY Then ret = 0
690  freed += ret
696  If This is the same regardless of which rwsem implementation that is being used.* It is just a heuristic meant to be called by somebody alreadying holding the* rwsem to see if somebody from an incompatible type is wanting access to the* lock. Then
697  freed = If freed Else 1
698  Break
702  lease a read lock
703  out :
704  cond_resched()
705  Return freed
Caller
NameDescribe
drop_slab_node
shrink_node_memcgs