函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\list_lru.c Create Date:2022-07-27 15:57:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__list_lru_walk_one

函数原型:static unsigned long __list_lru_walk_one(struct list_lru_node *nlru, int memcg_idx, list_lru_walk_cb isolate, void *cb_arg, unsigned long *nr_to_walk)

返回类型:unsigned long

参数:

类型参数名称
struct list_lru_node *nlru
intmemcg_idx
list_lru_walk_cbisolate
void *cb_arg
unsigned long *nr_to_walk
217  isolated等于0
219  l等于list_lru_from_memcg_idx(nlru, memcg_idx)
220  restart :
228  如果非nr_to_walk退出
230  nr_to_walk先自减
232  ret等于isolate(item, l, & protects all lists on the node, including per cgroup , cb_arg)
234  :ret恒等于m removed, but lock has beendropped and reacquired
235  assert_spin_locked( & protects all lists on the node, including per cgroup )
237  :ret恒等于m removed from list
238  isolated自加
239  nr_items自减
245  如果ret恒等于m removed, but lock has beendropped and reacquired 则转到:restart
247  退出
248  :ret恒等于m referenced, give another pass
249  链表项移动到尾部
250  退出
251  :ret恒等于m cannot be locked, skip
252  退出
253  :ret恒等于m not freeable. May drop the lockinternally, but has to return locked.
258  assert_spin_locked( & protects all lists on the node, including per cgroup )
259  转到:restart
260  默认
261  BUG()
264  返回:isolated
调用者
名称描述
list_lru_walk_one
list_lru_walk_one_irq
list_lru_walk_node