Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:find_mergeable

Proto:struct kmem_cache *find_mergeable(unsigned int size, unsigned int align, slab_flags_t flags, const char *name, void (*ctor)(void *))

Type:struct kmem_cache

Parameter:

TypeParameterName
unsigned intsize
unsigned intalign
slab_flags_tflags
const char *name
void (*ctor
337  If Merge control. If this is set then no merging of slab caches will occur. Then Return NULL
340  If ctor Then Return NULL
343  size = @a is a power of 2 value (size, size of * )
344  align = Figure out what the alignment of the objects will be given a set of* flags, a user specified alignment and the size of the objects.
345  size = @a is a power of 2 value (size, align)
346  flags = kmem_cache_flags(size, flags, name, NULL)
348  If flags & Set of flags that will prevent slab merging Then Return NULL
352  If Find a mergeable slab cache Then Continue
355  If size > The size of an object including metadata Then Continue
358  If (flags & SLAB_MERGE_SAME) != (Used for retrieving partial slabs, etc. & SLAB_MERGE_SAME) Then Continue
364  If (The size of an object including metadata & ~(align - 1)) != The size of an object including metadata Then Continue
367  If The size of an object including metadata - size >= size of * Then Continue
370  If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SLAB) && align && ( align > Alignment || Alignment % align ) Then Continue
374  Return s
376  Return NULL
Caller
NameDescribe
__kmem_cache_alias
__kmem_cache_alias