Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:alloc_buddy_huge_page

Proto:static struct page *alloc_buddy_huge_page(struct hstate *h, gfp_t gfp_mask, int nid, nodemask_t *nmask, nodemask_t *node_alloc_noretry)

Type:struct page

Parameter:

TypeParameterName
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  If node_alloc_noretry && No static inline type checking - see Subtlety (1) above. (nid, * node_alloc_noretry) Then 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  If alloc_try_hard Then gfp_mask |= __GFP_RETRY_MAYFAIL
1356  If nid == NUMA_NO_NODE Then nid = Returns the number of the nearest Node with memory
1358  page = This is the 'heart' of the zoned buddy allocator.
1359  If page Then __count_vm_event(HTLB_BUDDY_PGALLOC)
1361  Else __count_vm_event(HTLB_BUDDY_PGALLOC_FAIL)
1369  If node_alloc_noretry && page && Not alloc_try_hard Then node_clear(nid, * node_alloc_noretry)
1377  If node_alloc_noretry && Not page && alloc_try_hard Then The inline keyword gives the compiler room to decide to inline, or* not inline a function as it sees best(nid, * node_alloc_noretry)
1380  Return page
Caller
NameDescribe
alloc_fresh_huge_pageCommon helper to allocate a fresh hugetlb page. All specific allocators* should use this function to get new hugetlb pages