Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Always called with the slab_mutex held

Proto:static int __do_tune_cpucache(struct kmem_cache *cachep, int limit, int batchcount, int shared, gfp_t gfp)

Type:int

Parameter:

TypeParameterName
struct kmem_cache *cachep
intlimit
intbatchcount
intshared
gfp_tgfp
3850  __percpu * cpu_cache
3853  cpu_cache = alloc_kmem_cache_cpus(cachep, limit, batchcount)
3854  If Not cpu_cache Then Return -ENOMEM
3857  prev = cpu_cache
3858  cpu_cache = cpu_cache
3863  If prev Then kick_all_cpus_sync()
3866  check_irq_on()
3867  batchcount = batchcount
3868  limit = limit
3869  shared = shared
3871  If Not prev Then Go to setup_node
3874  for_each_online_cpu(cpu)
3875  LIST_HEAD(list)
3878  ac = per_cpu_ptr(prev, cpu)
3880  node = cpu_to_mem(cpu)
3881  n = get_node(cachep, node)
3882  spin_lock_irq( & list_lock)
3883  Caller needs to acquire correct kmem_cache_node's list_lock*@list: List of detached free slabs should be freed by caller
3884  spin_unlock_irq( & list_lock)
3885  slabs_destroy(cachep, & list)
3887  free previously allocated percpu memory
3889  setup_node :
3890  Return This initializes kmem_cache_node or resizes various caches for all nodes.
Caller
NameDescribe
do_tune_cpucache