Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_meminit.c Create Date:2022-07-28 06:37:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_kmem_cache_size_bulk

Proto:static int __init do_kmem_cache_size_bulk(int size, int *total_failures)

Type:int

Parameter:

TypeParameterName
intsize
int *total_failures
321  maxiter = 1024
323  bool fail = false
326  c = kmem_cache_create("test_cache", size, size, 0, NULL)
327  When iter < maxiter && Not fail cycle
328  num = kmem_cache_alloc_bulk(c, GFP_KERNEL, ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(objects), objects)
330  When i < num cycle
332  If bytes Then fail = true
337  If num Then kmem_cache_free_bulk(c, num, objects)
340  total_failures += fail
341  Return 1
Caller
NameDescribe
test_kmemcacheTest kmem_cache allocation by creating caches of different sizes, with and* without constructors, with and without SLAB_TYPESAFE_BY_RCU.