函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-27 16:35:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:The really slow allocator path where we enter direct reclaim

函数原型: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)

返回类型:struct page

参数:

类型参数名称
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  如果此条件成立可能性小(为编译器优化)(!( * did_some_progress))则返回:NULL
4138  retry :
4139  page等于get_page_from_freelist goes through the zonelist trying to allocate* a page.
4146  如果非page且非drained
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  转到:retry
4153  返回:page
调用者
名称描述
__alloc_pages_slowpath