函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:setup_cpu_cache

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

返回类型:int

参数:

类型参数名称
struct kmem_cache *cachep
gfp_tgfp
1793  如果(slab_state >= FULL)则返回:enable_cpucache(cachep, gfp)
1796  cpu_cache等于alloc_kmem_cache_cpus(cachep, 1, 1)
1797  如果非cpu_cache则返回:1
1800  如果(slab_state == No slab functionality yet )则
1802  For setting up all the kmem_cache_node for cache whose buffer_size is same as* size of kmem_cache_node.
1803  否则如果(slab_state == SLUB: kmem_cache_node available )则
1805  For setting up all the kmem_cache_node for cache whose buffer_size is same as* size of kmem_cache_node.
1806  否则
1812  BUG_ON(!node[node])
1817  next_reap等于jiffiesREAPTIMEOUT_NODEcachep取模REAPTIMEOUT_NODE
1821  avail等于0
1822  limit等于BOOT_CPUCACHE_ENTRIES
1823  batchcount等于1
1824  touched等于0
1825  batchcount等于1
1826  limit等于BOOT_CPUCACHE_ENTRIES
1827  返回:0
调用者
名称描述
__kmem_cache_create__kmem_cache_create - Create a cache.*@cachep: cache management descriptor*@flags: SLAB flags* Returns a ptr to the cache on success, NULL on failure.* Cannot be called within a int, but can be interrupted.