Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__list_lru_init

Proto:int __list_lru_init(struct list_lru *lru, bool memcg_aware, struct lock_class_key *key, struct shrinker *shrinker)

Type:int

Parameter:

TypeParameterName
struct list_lru *lru
boolmemcg_aware
struct lock_class_key *key
struct shrinker *shrinker
604  err = -ENOMEM
612  memcg_get_cache_ids()
614  node = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
615  If Not node Then Go to out
618  for_each_node(i)
619  Process spin lock initialization( & protects all lists on the node, including per cgroup )
620  If key Then lockdep_set_class( & protects all lists on the node, including per cgroup , key)
622  init_one_lru( & global list, used for the root cgroup in cgroup aware lrus )
625  err = memcg_init_list_lru(lru, memcg_aware)
626  If err Then
627  kfree(node)
629  node = NULL
630  Go to out
633  list_lru_register(lru)
634  out :
635  memcg_put_cache_ids()
636  Return err
Caller
NameDescribe
workingset_init