Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Calculate the order of allocation given an slab object size.* The order of allocation has significant impact on performance and other* system components. Generally order 0 allocations should be preferred since

Proto:static inline unsigned int slab_order(unsigned int size, unsigned int min_objects, unsigned int max_order, unsigned int fract_leftover)

Type:unsigned int

Parameter:

TypeParameterName
unsigned intsize
unsigned intmin_objects
unsigned intmax_order
unsigned intfract_leftover
3251  min_order = Mininum / Maximum order of slab pages. This influences locking overhead* and slab fragmentation. A higher order reduces the number of partial slabs* and increases the number of allocations possible without having to* take the list_lock.
3254  If order_objects(min_order, size) > since page.objects is u15 Then Return get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory - 1
3257  When order <= max_order cycle
3260  slab_size = PAGE_SIZE << order
3263  rem = slab_size % size
3265  If rem <= slab_size / fract_leftover Then Break
3269  Return order
Caller
NameDescribe
calculate_order