Function report |
Source Code:mm\page_alloc.c |
Create Date:2022-07-28 15:06:10 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This is the 'heart' of the zoned buddy allocator.
Proto:struct page *__alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, int preferred_nid, nodemask_t *nodemask)
Type:struct page
Parameter:
Type | Parameter | Name |
---|---|---|
gfp_t | gfp_mask | |
unsigned int | order | |
int | preferred_nid | |
nodemask_t * | nodemask |
4704 | alloc_flags = ALLOC_WMARK_LOW |
4706 | struct alloc_context ac = {} |
4714 | Return NULL |
4717 | gfp_mask &= gfp_allowed_mask |
4718 | alloc_mask = gfp_mask |
4719 | If Not prepare_alloc_pages(gfp_mask, order, preferred_nid, nodemask, & ac, & alloc_mask, & alloc_flags) Then Return NULL |
4732 | If Value is more likely to compile time(page) Then Go to out |
4742 | spread_dirty_pages = false |
4748 | If Value for the false possibility is greater at compile time(nodemask != nodemask) Then nodemask = nodemask |
4751 | page = __alloc_pages_slowpath(alloc_mask, order, & ac) |
4753 | out : |
4754 | If memcg_kmem_enabled() && gfp_mask & __GFP_ACCOUNT && page && Value for the false possibility is greater at compile time(__memcg_kmem_charge(page, gfp_mask, order) != 0) Then |
4756 | __free_pages(page, order) |
4757 | page = NULL |
4760 | trace_mm_page_alloc(page, order, alloc_mask, migratetype) |
4762 | Return page |
Name | Describe |
---|---|
alloc_buddy_huge_page | |
alloc_pages_vma | alloc_pages_vma - Allocate a page for a VMA.*@gfp:* %GFP_USER user allocation.* %GFP_KERNEL kernel allocations,* %GFP_HIGHMEM highmem/user allocations,* %GFP_FS allocation should not call back into a file system.* %GFP_ATOMIC don't sleep. |
alloc_pages_current | alloc_pages_current - Allocate pages.*@gfp:* %GFP_USER user allocation,* %GFP_KERNEL kernel allocation,* %GFP_HIGHMEM highmem allocation,* %GFP_FS don't call back into a file system.* %GFP_ATOMIC don't sleep. |
new_page_nodemask |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |