函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slub.c Create Date:2022-07-27 17:22:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static inline unsigned int slab_order(unsigned int size, unsigned int min_objects, unsigned int max_order, unsigned int fract_leftover)

返回类型:unsigned int

参数:

类型参数名称
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  如果order_objects(min_order, size)大于since page.objects is u15 则返回: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 order小于等于max_order循环
3260  slab_size等于PAGE_SIZE左移order
3263  rem等于slab_size取模size
3265  如果rem小于等于slab_sizefract_leftover退出
3269  返回:order
调用者
名称描述
calculate_order