linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Matt Fleming <mfleming@cloudflare.com>
Cc: linux-mm@kvack.org, "Christoph Lameter (Ampere)" <cl@gentwo.org>,
	willy@infradead.org, kernel-team <kernel-team@cloudflare.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Charan Teja Kalla <quic_charante@quicinc.com>
Subject: Re: order-0 page alloc failures during interrupt context on v6.6.43
Date: Sun, 1 Sep 2024 21:24:32 +0200	[thread overview]
Message-ID: <e37f48a5-f1ec-4f68-b2dd-f0dc858c1a1b@suse.cz> (raw)
In-Reply-To: <CAGis_TUNd6A5x6Xa--k9Z8PBiKdyjw8dxyrcryH13YEYrxB31Q@mail.gmail.com>

On 8/30/24 17:43, Matt Fleming wrote:
> On Thu, Aug 29, 2024 at 4:48 PM Vlastimil Babka <vbabka@suse.cz> wrote:
>> AFAICS:
>>
>> - __zone_watermark_unusable_free() for ALLOC_RESERVES (which includes
>> ALLOC_NON_BLOCK which GFP_ATOMIC allocations have) does not subtract the
>> reserve_highatomic, so the allocations pass the watermarks
>> - but in rmqueue_buddy() only ALLOC_OOM is able to fallback into highatomic
>> - unreserve_highatomic_pageblock() is only called from reclaim and there's
>> no reclaim for GFP_ATOMIC
>>
>> (also worth checking if kswapd even does anything if free > high, but it's
>> all highatomic, maybe not? so it can't help us here)
> 
> As far as I can tell we'll wake kswapd but like you said because free
>> high it thinks the pgdat is balanced.

Hm wonder if we should change that and kswapd should count free without
highatomic reserve.

> How is the system supposed to recover in this situation? Wait for a
> non-atomic alloc to fail and enter direct reclaim?

That's probably how it recovers but it's not how it's supposed to recover :)
Aside from changing the kswapd behavior, GFP_ATOMIC should likely be allowed
to fallback into highatomic reserve in rmqueue_buddy() same as ALLOC_OOM can?


  reply	other threads:[~2024-09-01 19:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 20:02 Matt Fleming
2024-08-22 22:07 ` Matt Fleming
2024-08-29 15:48   ` Vlastimil Babka
2024-08-30 15:43     ` Matt Fleming
2024-09-01 19:24       ` Vlastimil Babka [this message]
2024-08-23 16:09 ` Christoph Lameter (Ampere)
2024-08-23 20:25   ` Matt Fleming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e37f48a5-f1ec-4f68-b2dd-f0dc858c1a1b@suse.cz \
    --to=vbabka@suse.cz \
    --cc=cl@gentwo.org \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@cloudflare.com \
    --cc=linux-mm@kvack.org \
    --cc=mfleming@cloudflare.com \
    --cc=mgorman@techsingularity.net \
    --cc=quic_charante@quicinc.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox