mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zi Yan <ziy@nvidia.com>
To: Gregory Price <gourry@gourry.net>
Cc: linux-mm@kvack.org, Jiayuan Chen <jiayuan.chen@shopee.com>,
	linux-kernel@vger.kernel.org, kernel-team@meta.com,
	akpm@linux-foundation.org, vbabka@kernel.org, surenb@google.com,
	mhocko@suse.com, brendan.jackman@linux.dev, hannes@cmpxchg.org,
	flyinrm@gmail.com, stable@vger.kernel.org
Subject: Re: [PATCH] mm/page_alloc: let the highest memory node recover from hopeless state
Date: Thu, 22 Oct 2026 11:40:59 -0400	[thread overview]
Message-ID: <1CF47F72-BA4D-435A-924A-5CFB66FFB8DD@nvidia.com> (raw)
In-Reply-To: <atZ6H6IIx5gmiAkg@gourry-fedora-PF4VCD3F>

On 19 Oct 2026, at 16:16, Gregory Price wrote:

> On Mon, Oct 19, 2026 at 03:51:27PM -0400, Zi Yan wrote:
>> On Mon Oct 19, 2026 at 2:48 PM EDT, Gregory Price (Meta) wrote:
>>>  		if (kswapd_test_hopeless(pgdat) &&
>>> -		    next_memory_node(pgdat->node_id) < MAX_NUMNODES)
>>> +		    num_node_state(N_MEMORY) > 1)
>>
>> Why does a runtime behavior, clearing kswapd hopeless state, depend on a
>> static memory topology (excluding memory hotadd/hotremove in this
>> context)? There is nothing telling us if a fallback node has available memory.
>>
>> Just reset it regardless. kswapd can go hopeless later if the node
>> cannot be reclaimed.
>>
>
> I mostly agree, but this was more of behavioral change than i was
> outright willing to commit to in a stable backport.
>
> I can send a follow up commit to drop the check altogether if you
> prefer - but I'm not sure we want to drop it outright in the backport.

Yeah, for that specific Fixes, your patch works. Feel free to add

Acked-by: Zi Yan <ziy@nvidia.com>

>
>> BTW, LLM also points out that kswapd_try_clear_hopeless(), called by
>> direct reclaim, only clears hopeless when the node is balanced, but that
>> rarely happens. So hopeless state can stay much longer if there is only
>> one node. Adding Jiayuna, who added kswapd_try_clear_hopeless(), to gvie
>> some insight.
>>
>
> Yeah I have some additional things in my pile on the hopeless flag, but
> i haven't gotten around to them.

Got it. The above issue will have a separate fix I guess.


Best Regards,
Yan, Zi

  reply	other threads:[~2026-10-22 15:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 18:48 Gregory Price (Meta)
2026-10-19 19:51 ` Zi Yan
2026-10-19 20:16   ` Gregory Price
2026-10-22 15:40     ` Zi Yan [this message]
2026-10-19 20:13 ` Johannes Weiner
2026-10-19 20:40   ` Gregory Price
2026-10-20  7:21 ` Vlastimil Babka (SUSE)

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=1CF47F72-BA4D-435A-924A-5CFB66FFB8DD@nvidia.com \
    --to=ziy@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=brendan.jackman@linux.dev \
    --cc=flyinrm@gmail.com \
    --cc=gourry@gourry.net \
    --cc=hannes@cmpxchg.org \
    --cc=jiayuan.chen@shopee.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=stable@vger.kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.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

all inboxes | Powered by JetHome®