Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__list_lru_walk_one

Proto: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)

Type:unsigned long

Parameter:

TypeParameterName
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  If Not nr_to_walk Then Break
230  --nr_to_walk
232  ret = isolate(item, l, & protects all lists on the node, including per cgroup , cb_arg)
234  Case ret == m removed, but lock has beendropped and reacquired
235  assert_spin_locked( & protects all lists on the node, including per cgroup )
237  Case ret == m removed from list
238  isolated++
239  nr_items--
245  If ret == m removed, but lock has beendropped and reacquired Then Go to restart
247  Break
248  Case ret == m referenced, give another pass
249  list_move_tail - delete from one list and add as another's tail*@list: the entry to move*@head: the head that will follow our entry
250  Break
251  Case ret == m cannot be locked, skip
252  Break
253  Case 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  Go to restart
260  Default
261  BUG()
264  Return isolated
Caller
NameDescribe
list_lru_walk_one
list_lru_walk_one_irq
list_lru_walk_node