Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\asm-generic\getorder.h Create Date:2022-07-28 05:34:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static inline __attribute_const__ int get_order(unsigned long size)

Type:int

Parameter:

TypeParameterName
unsigned longsize
31  If __builtin_constant_p(size) Then
32  If Not size Then Return BITS_PER_LONG - PAGE_SHIFT determines the page size
35  If size < 1UL << PAGE_SHIFT determines the page size Then Return 0
38  Return log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the ((size) - 1) - PAGE_SHIFT determines the page size + 1
41  size--
42  size >>= PAGE_SHIFT determines the page size
44  Return ls - find last set bit in word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffs, but returns the position of the most significant set bit.* fls(value) returns 0 if value is 0 or the position of the last
Caller
NameDescribe
kvmclock_init_mem
gart_alloc_coherentallocate and map a coherent mapping
init_amd_gattPrivate Northbridge GATT initialization in case we cannot use the* AGP driver for some reason.
gart_iommu_init
dma_free_attrs
__dma_direct_alloc_pages
dma_direct_alloc_pages
dma_direct_free_pages
dma_alloc_contiguousdma_alloc_contiguous() - allocate contiguous pages*@dev: Pointer to device for which the allocation is performed
dma_free_contiguousdma_free_contiguous() - release allocated pages*@dev: Pointer to device for which the pages were allocated
__dma_alloc_from_coherent
dma_virt_alloc
dma_virt_free
swiotlb_late_init_with_default_sizeSystems with larger DMA zones (those that don't support ISA) can* initialize the swiotlb later using the slab allocator if needed.* This should be just like above, but with some error catching.
swiotlb_late_init_with_tbl
swiotlb_exit
dma_common_contiguous_remapRemaps an allocated contiguous region into another vm_area.* Cannot be used in non-sleeping contexts
kimage_alloc_init
kimage_file_alloc_init
do_mmap_privateset up a private mapping or an anonymous shared mapping
vb_alloc
vb_free
alloc_pages_exactalloc_pages_exact - allocate an exact number physically-contiguous pages.*@size: the number of bytes to allocate*@gfp_mask: GFP flags for the allocation, must not contain __GFP_COMP* This function is similar to alloc_pages(), except that it allocates the
alloc_pages_exact_nidalloc_pages_exact_nid - allocate an exact number of physically-contiguous* pages on a node
alloc_large_system_hashallocate a large system hash table from bootmem* - it is assumed that the hash table must contain an exact power-of-2* quantity of entries* - limit is the number of hash buckets, not the total allocation size
vmemmap_alloc_block
__do_kmalloc_nodeEnd of slob allocator proper. Begin kmem_cache_alloc and kmalloc frontend.
slob_alloc_node
__kmem_cache_free
slab_orderCalculate 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
calculate_sizesalculate_sizes() determines the order and the distribution of data within* a slab object.
kmem_cache_open
kmalloc_large_node
__kmalloc_node
__kmalloc_node_track_caller
try_charge
param_set_bufsize
ima_alloc_pagesma_alloc_pages() - Allocate contiguous pages
ima_free_pagesma_free_pages() - Free pages allocated by ima_alloc_pages().*@ptr: Pointer to allocated pages.*@size: Size of allocated buffer.
io_mem_alloc
ring_pages
ramfs_nommu_expand_for_mappingadd a contiguous set of pages into a ramfs inode when it's truncated from* size 0 on the assumption that it's going to be used for an mmap of shared* memory