Function report |
Source Code:mm\page_alloc.c |
Create Date:2022-07-28 15:06:01 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__alloc_pages_slowpath
Proto:static inline struct page *__alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, struct alloc_context *ac)
Type:struct page
Parameter:
Type | Parameter | Name |
---|---|---|
gfp_t | gfp_mask | |
unsigned int | order | |
struct alloc_context * | ac |
4393 | can_direct_reclaim = gfp_mask & Caller can reclaim |
4413 | retry_cpuset : |
4414 | compaction_retries = 0 |
4415 | no_progress_loops = 0 |
4424 | alloc_flags = gfp_to_alloc_flags(gfp_mask) |
4434 | If Not Pointer to actual zone Then Go to nopage |
4437 | If alloc_flags & allow waking of kswapd Then wake_all_kswapds(order, gfp_mask, ac) |
4457 | If can_direct_reclaim && (costly_order || order > 0 && migratetype != MIGRATE_MOVABLE ) && Not gfp_pfmemalloc_allowed(gfp_mask) Then |
4461 | page = __alloc_pages_direct_compact(gfp_mask, order, alloc_flags, ac, INIT_COMPACT_PRIORITY, & compact_result) |
4472 | If costly_order && gfp_mask & __GFP_NORETRY Then |
4490 | If compact_result == COMPACT_SKIPPED || compact_result == COMPACT_DEFERRED Then Go to nopage |
4503 | retry : |
4505 | If alloc_flags & allow waking of kswapd Then 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 | If reserve_flags Then alloc_flags = reserve_flags |
4517 | If Not (alloc_flags & check for correct cpuset ) || reserve_flags Then |
4518 | nodemask = NULL |
4529 | If Not can_direct_reclaim Then Go to nopage |
4533 | If flags & Allocating memory Then Go to nopage |
4543 | page = __alloc_pages_direct_compact(gfp_mask, order, alloc_flags, ac, compact_priority, & compact_result) |
4549 | If gfp_mask & __GFP_NORETRY Then Go to nopage |
4556 | If costly_order && Not (gfp_mask & __GFP_RETRY_MAYFAIL) Then Go to nopage |
4569 | If did_some_progress > 0 && should_compact_retry(ac, order, alloc_flags, compact_result, & compact_priority, & compaction_retries) Then Go to retry |
4577 | If check_retry_cpuset(cpuset_mems_cookie, ac) Then Go to retry_cpuset |
4581 | page = __alloc_pages_may_oom(gfp_mask, order, ac, & did_some_progress) |
4592 | If did_some_progress Then |
4593 | no_progress_loops = 0 |
4594 | Go to retry |
4597 | nopage : |
4599 | If check_retry_cpuset(cpuset_mems_cookie, ac) Then Go to retry_cpuset |
4606 | If gfp_mask & __GFP_NOFAIL Then |
4611 | If WARN_ON_ONCE(!can_direct_reclaim) Then Go to fail |
4619 | WARN_ON_ONCE(flags & Allocating memory ) |
4635 | page = __alloc_pages_cpuset_fallback(gfp_mask, order, ry to alloc harder , ac) |
4639 | cond_resched() |
4640 | Go to retry |
4642 | fail : |
4643 | warn_alloc(gfp_mask, nodemask, "page allocation failure: order:%u", order) |
4645 | got_pg : |
4646 | Return page |
Name | Describe |
---|---|
__alloc_pages_nodemask | This is the 'heart' of the zoned buddy allocator. |
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 |