函数逻辑报告 |
Source Code:mm\page_alloc.c |
Create Date:2022-07-27 16:36:08 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__alloc_pages_slowpath
函数原型:static inline struct page *__alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, struct alloc_context *ac)
返回类型:struct page
参数:
类型 | 参数 | 名称 |
---|---|---|
gfp_t | gfp_mask | |
unsigned int | order | |
struct alloc_context * | ac |
4413 | retry_cpuset : |
4414 | compaction_retries等于0 |
4415 | no_progress_loops等于0 |
4434 | 如果非Pointer to actual zone 则转到:nopage |
4437 | 如果alloc_flags按位与allow waking of kswapd 则wake_all_kswapds(order, gfp_mask, ac) |
4457 | 如果can_direct_reclaim且costly_order或order大于0且migratetype不等于MIGRATE_MOVABLE的值且非gfp_pfmemalloc_allowed(gfp_mask)则 |
4461 | page等于__alloc_pages_direct_compact(gfp_mask, order, alloc_flags, ac, INIT_COMPACT_PRIORITY, & compact_result) |
4472 | 如果costly_order且gfp_mask按位与__GFP_NORETRY则 |
4490 | 如果compact_result恒等于COMPACT_SKIPPED或compact_result恒等于COMPACT_DEFERRED则转到:nopage |
4503 | retry : |
4505 | 如果alloc_flags按位与allow waking of kswapd 则wake_all_kswapds(order, gfp_mask, ac) |
4508 | reserve_flags等于Distinguish requests which really need access to full memory* reserves from oom victims which can live with a portion of it |
4509 | 如果reserve_flags则alloc_flags等于reserve_flags |
4517 | 如果非alloc_flags按位与check for correct cpuset 的值或reserve_flags则 |
4518 | nodemask = NULL |
4529 | 如果非can_direct_reclaim则转到:nopage |
4533 | 如果flags按位与Allocating memory 则转到:nopage |
4543 | page等于__alloc_pages_direct_compact(gfp_mask, order, alloc_flags, ac, compact_priority, & compact_result) |
4549 | 如果gfp_mask按位与__GFP_NORETRY则转到:nopage |
4556 | 如果costly_order且非gfp_mask按位与__GFP_RETRY_MAYFAIL的值则转到:nopage |
4569 | 如果did_some_progress大于0且should_compact_retry(ac, order, alloc_flags, compact_result, & compact_priority, & compaction_retries)则转到:retry |
4577 | 如果check_retry_cpuset(cpuset_mems_cookie, ac)则转到:retry_cpuset |
4581 | page等于__alloc_pages_may_oom(gfp_mask, order, ac, & did_some_progress) |
4592 | 如果did_some_progress则 |
4593 | no_progress_loops等于0 |
4594 | 转到:retry |
4597 | nopage : |
4599 | 如果check_retry_cpuset(cpuset_mems_cookie, ac)则转到:retry_cpuset |
4606 | 如果gfp_mask按位与__GFP_NOFAIL则 |
4611 | 如果WARN_ON_ONCE(!can_direct_reclaim)则转到:fail |
4619 | WARN_ON_ONCE(flags & Allocating memory ) |
4639 | cond_resched() |
4640 | 转到:retry |
4642 | fail : |
4643 | warn_alloc(gfp_mask, nodemask, "page allocation failure: order:%u", order) |
4645 | got_pg : |
4646 | 返回:page |
名称 | 描述 |
---|---|
__alloc_pages_nodemask | This is the 'heart' of the zoned buddy allocator. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |