函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-27 17:17:27
Last Modify:2022-05-23 17:02:55 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:init_cache_node

函数原型:static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp)

返回类型:int

参数:

类型参数名称
struct kmem_cache *cachep
intnode
gfp_tgfp
864  n等于get_node(cachep, node)
865  如果n
866  spin_lock_irq( & list_lock)
867  free_limit等于1加nr_cpus_node(node)的和乘batchcountnum
869  spin_unlock_irq( & list_lock)
871  返回:0
874  n等于kmalloc_node(sizeof(structkmem_cache_node), gfp, node)
875  如果非n则返回:负ENOMEM
878  kmem_cache_node_init(n)
879  next_reap等于jiffiesREAPTIMEOUT_NODEcachep取模REAPTIMEOUT_NODE
882  free_limit等于1加nr_cpus_node(node)的和乘batchcountnum
890  node[node]等于n
892  返回:0
调用者
名称描述
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