函数逻辑报告 |
Source Code:mm\page_alloc.c |
Create Date:2022-07-27 16:36:17 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:This is the 'heart' of the zoned buddy allocator.
函数原型:struct page *__alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, int preferred_nid, nodemask_t *nodemask)
返回类型:struct page
参数:
类型 | 参数 | 名称 |
---|---|---|
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 | 返回:NULL |
4717 | gfp_mask与等于gfp_allowed_mask |
4718 | alloc_mask等于gfp_mask |
4719 | 如果非prepare_alloc_pages(gfp_mask, order, preferred_nid, nodemask, & ac, & alloc_mask, & alloc_flags)则返回:NULL |
4732 | 如果此条件成立可能性大(为编译器优化)(page)则转到:out |
4742 | spread_dirty_pages = false |
4748 | 如果此条件成立可能性小(为编译器优化)(nodemask != nodemask)则nodemask等于nodemask |
4751 | page等于__alloc_pages_slowpath(alloc_mask, order, & ac) |
4753 | out : |
4754 | 如果memcg_kmem_enabled()且gfp_mask按位与__GFP_ACCOUNT且page且此条件成立可能性小(为编译器优化)(__memcg_kmem_charge(page, gfp_mask, order) != 0)则 |
4756 | __free_pages(page, order) |
4757 | page = NULL |
4760 | trace_mm_page_alloc(page, order, alloc_mask, migratetype) |
4762 | 返回:page |
名称 | 描述 |
---|---|
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 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |