Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-28 15:43:39
Last Modify:2022-05-23 17:02:55 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:init_cache_node

Proto:static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp)

Type:int

Parameter:

TypeParameterName
struct kmem_cache *cachep
intnode
gfp_tgfp
864  n = get_node(cachep, node)
865  If n Then
866  spin_lock_irq( & list_lock)
867  free_limit = (1 + nr_cpus_node(node)) * batchcount + num
869  spin_unlock_irq( & list_lock)
871  Return 0
874  n = kmalloc_node(sizeof(structkmem_cache_node), gfp, node)
875  If Not n Then Return -ENOMEM
878  kmem_cache_node_init(n)
879  next_reap = jiffies + REAPTIMEOUT_NODE + cachep % REAPTIMEOUT_NODE
882  free_limit = (1 + nr_cpus_node(node)) * batchcount + num
890  node[node] = n
892  Return 0
Caller
NameDescribe
init_cache_node_nodeAllocates and initializes node for a node on each slab cache, used for* either memory or cpu hotplug
setup_kmem_cache_node