Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Checks whether it makes sense to retry the reclaim to make a forward progress* for the given allocation request.* We give up when we either have tried MAX_RECLAIM_RETRIES in a row* without success, or when we couldn't even meet the watermark if we

Proto:static inline bool should_reclaim_retry(gfp_t gfp_mask, unsigned order, struct alloc_context *ac, int alloc_flags, bool did_some_progress, int *no_progress_loops)

Type:bool

Parameter:

TypeParameterName
gfp_tgfp_mask
unsignedorder
struct alloc_context *ac
intalloc_flags
booldid_some_progress
int *no_progress_loops
4272  bool ret = false
4279  If did_some_progress && order <= PAGE_ALLOC_COSTLY_ORDER is the order at which allocations are deemed* costly to service. That is between allocation orders which should* coalesce naturally under reasonable reclaim pressure and those which* will not. Then no_progress_loops = 0
4281  Else no_progress_loops++
4288  If no_progress_loops > Maximum number of reclaim retries without progress before the OOM* killer is consider the only way forward. Then
4290  Return Used when an allocation is about to fail under memory pressure
4303  min_wmark = min_wmark_pages(zone)
4306  available = reclaimable = This misses isolated pages which are not accounted for to save counters.* As the data only determines if reclaim or compaction continues, it is* not expected that isolated pages will be a dominating factor.
4307  available += More accurate version that also considers the currently pending* deltas. For that we need to loop over all cpus to find the current* deltas. There is no synchronization so the result cannot be* exactly accurate either.
4313  wmark = Return true if free base pages are above 'mark'. For high-order checks it* will return true of the order-0 watermark is reached and there is at least* one free page of a suitable size. Checking now avoids taking the zone lock
4315  trace_reclaim_retry_zone(z, order, reclaimable, available, min_wmark, * no_progress_loops, wmark)
4317  If wmark Then
4324  If Not did_some_progress Then
4336  ret = true
4337  Go to out
4341  out :
4349  If flags & I'm a workqueue worker Then schedule_timeout_uninterruptible(1)
4351  Else cond_resched()
4353  Return ret
Caller
NameDescribe
__alloc_pages_slowpath