[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ed3e585-394a-42ff-03c4-a9bb8b5fcbc4@I-love.SAKURA.ne.jp>
Date: Sat, 25 Apr 2020 09:32:02 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: David Rientjes <rientjes@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Vlastimil Babka <vbabka@...e.cz>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [patch] mm, oom: stop reclaiming if GFP_ATOMIC will start failing
soon
On 2020/04/25 5:48, David Rientjes wrote:
> @@ -4372,11 +4372,21 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,
> ac->nodemask) {
> unsigned long available;
> unsigned long reclaimable;
> + unsigned long free;
> unsigned long min_wmark = min_wmark_pages(zone);
> bool wmark;
>
> + free = zone_page_state_snapshot(zone, NR_FREE_PAGES);
> + /*
> + * If this zone is approaching the point where even order-0
> + * GFP_ATOMIC allocations will fail, stop considering reclaim.
> + */
> + if (!__zone_watermark_ok(zone, 0, min_wmark, ac_classzone_idx(ac),
> + alloc_flags | ALLOC_HIGH, free))
> + continue;
This is to trigger the OOM killer more aggressively, isn't it? But where is the
guarantee that this is an allocation request which can trigger the OOM killer?
If this is an allocation request which cannot trigger the OOM killer, wouldn't
this cause premature allocation failures?
> +
> available = reclaimable = zone_reclaimable_pages(zone);
> - available += zone_page_state_snapshot(zone, NR_FREE_PAGES);
> + available += free;
>
> /*
> * Would the allocation succeed if we reclaimed all
>
Powered by blists - more mailing lists