Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:No kmalloc_node yet so do it by hand. We know that this is the first* slab on the node for this slabcache. There are no concurrent accesses* possible.* Note that this function only works on the kmem_cache_node* when allocating for the kmem_cache_node

Proto:static void early_kmem_cache_node_alloc(int node)

Type:void

Parameter:

TypeParameterName
intnode
3372  BUG_ON(The size of an object including metadata < size of kmem_cache_node )
3374  page = new_slab(kmem_cache_node, GFP_NOWAIT, node)
3376  BUG_ON(!page)
3377  If page_to_nid(page) != node Then
3378  pr_err("SLUB: Unable to allocate memory from node %d\n", node)
3379  pr_err("SLUB: Allocating a useless per node structure in order to be able to continue\n")
3382  n = first free object
3383  BUG_ON(!n)
3388  n = kasan_kmalloc(kmem_cache_node, n, size of kmem_cache_node , GFP_KERNEL)
3390  first free object = get_freepointer(kmem_cache_node, n)
3391  SLUB = 1
3392  frozen = 0
3393  node[node] = n
3394  init_kmem_cache_node(n)
3395  inc_slabs_node(kmem_cache_node, node, objects)
3401  Management of partially allocated slabs.
Caller
NameDescribe
init_kmem_cache_nodes