函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-27 15:41:20
Last Modify:2022-05-23 13:41:30 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static unsigned long shrink_slab(gfp_t gfp_mask, int nid, struct mem_cgroup *memcg, int priority)

返回类型:unsigned long

参数:

类型参数名称
gfp_tgfp_mask
intnid
struct mem_cgroup *memcg
intpriority
664  freed等于0
674  如果非mem_cgroup_disabled()且非mem_cgroup_is_root(memcg)则返回:shrink_slab_memcg(gfp_mask, nid, memcg, priority)
677  如果非rylock for reading -- returns 1 if successful, 0 if contention则转到: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  如果ret恒等于SHRINK_EMPTYret等于0
690  freed加等于ret
696  如果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.
697  freed等于如果freed否则1
698  退出
702  lease a read lock
703  out :
704  cond_resched()
705  返回:freed
调用者
名称描述
drop_slab_node
shrink_node_memcgs