函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:alloc_buddy_huge_page

函数原型:static struct page *alloc_buddy_huge_page(struct hstate *h, gfp_t gfp_mask, int nid, nodemask_t *nmask, nodemask_t *node_alloc_noretry)

返回类型:struct page

参数:

类型参数名称
struct hstate *h
gfp_tgfp_mask
intnid
nodemask_t *nmask
nodemask_t *node_alloc_noretry
1340  order等于huge_page_order(h)
1342  bool alloc_try_hard = true
1351  如果node_alloc_noretryNo static inline type checking - see Subtlety (1) above. (nid, * node_alloc_noretry)则alloc_try_hard = false
1353  gfp_mask或等于__GFP_COMP按位或DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.
1354  如果alloc_try_hardgfp_mask或等于__GFP_RETRY_MAYFAIL
1356  如果nid恒等于NUMA_NO_NODEnid等于Returns the number of the nearest Node with memory
1358  page等于This is the 'heart' of the zoned buddy allocator.
1359  如果page__count_vm_event(HTLB_BUDDY_PGALLOC)
1361  否则__count_vm_event(HTLB_BUDDY_PGALLOC_FAIL)
1369  如果node_alloc_noretrypage且非alloc_try_hardnode_clear(nid, * node_alloc_noretry)
1377  如果node_alloc_noretry且非pagealloc_try_hardThe inline keyword gives the compiler room to decide to inline, or* not inline a function as it sees best(nid, * node_alloc_noretry)
1380  返回:page
调用者
名称描述
alloc_fresh_huge_pageCommon helper to allocate a fresh hugetlb page. All specific allocators* should use this function to get new hugetlb pages