Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:The really slow allocator path where we enter direct reclaim

Proto:static inline struct page *__alloc_pages_direct_reclaim(gfp_t gfp_mask, unsigned int order, unsigned int alloc_flags, const struct alloc_context *ac, unsigned long *did_some_progress)

Type:struct page

Parameter:

TypeParameterName
gfp_tgfp_mask
unsigned intorder
unsigned intalloc_flags
const struct alloc_context *ac
unsigned long *did_some_progress
4131  struct page * page = NULL
4132  bool drained = false
4134  did_some_progress = Perform direct synchronous page reclaim
4135  If Value for the false possibility is greater at compile time(!( * did_some_progress)) Then Return NULL
4138  retry :
4139  page = get_page_from_freelist goes through the zonelist trying to allocate* a page.
4146  If Not page && Not drained Then
4147  Used when an allocation is about to fail under memory pressure
4148  Spill all the per-cpu pages from all CPUs back into the buddy allocator.* When zone parameter is non-NULL, spill just the single zone's pages.* Note that this can be extremely slow as the draining happens in a workqueue.
4149  drained = true
4150  Go to retry
4153  Return page
Caller
NameDescribe
__alloc_pages_slowpath