函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hugetlb_hstate_alloc_pages

函数原型:static void __init hugetlb_hstate_alloc_pages(struct hstate *h)

返回类型:void

参数:

类型参数名称
struct hstate *h
2173  如果非hstate_is_gigantic(h)则
2180  node_alloc_noretry等于kmalloc(node_alloc_noretry的长度, GFP_KERNEL)
2182  否则
2184  node_alloc_noretry = NULL
2188  如果node_alloc_noretrynodes_clear( * node_alloc_noretry)
2191 i小于max_huge_pages循环
2192  如果hstate_is_gigantic(h)则
2193  如果非alloc_bootmem_huge_page(h)则退出
2195  否则如果非Allocates a fresh page to the hugetlb allocator pool in the node interleaved* manner.退出
2199  cond_resched()
2201  如果i小于max_huge_pages
2204  string_get_size - get the size in the specified units*@size: The size to be converted in blocks*@blk_size: Size of the block (use 1 for size in bytes)*@units: units to use (powers of 1000 or 1024)*@buf: buffer to format to*@len: length of buffer* This
2205  打印警告信息("HugeTLB: allocating %lu of page size %s failed. Only allocated %lu hugepages.\n", max_huge_pages, buf, i)
2207  max_huge_pages等于i
2210  释放内存
调用者
名称描述
hugetlb_init_hstates
hugetlb_nrpages_setup