From: Michal Hocko <mhocko@suse.com>
To: Altan Hacigumus <ahacigu.linux@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Kairui Song <kasong@tencent.com>, Qi Zheng <qi.zheng@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Barry Song <baohua@kernel.org>,
Axel Rasmussen <axelrasmussen@google.com>,
Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R . Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Jiayuan Chen <jiayuan.chen@shopee.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/vmscan: clear hopeless kswapd when global direct reclaim makes progress
Date: Thu, 16 Jul 2026 10:16:55 +0200 [thread overview]
Message-ID: <aliTd8K5lqQZIX85@tiehlicka> (raw)
In-Reply-To: <CALjTKD=XnW-SirJoS1+SJLZ2hNvobEKm2mCfdv72C65-zQyDBg@mail.gmail.com>
On Wed 15-07-26 23:20:18, Altan Hacigumus wrote:
> On Wed, Jul 15, 2026 at 12:12 AM Michal Hocko <mhocko@suse.com> wrote:
> >
> > On Tue 14-07-26 19:32:04, Altan Hacigumus wrote:
> > > On Tue, Jul 14, 2026 at 4:34 AM Michal Hocko <mhocko@suse.com> wrote:
> > [...]
> > > [2] Also, there is one more condition I've been looking at, from the
> > > Sashiko review (a theoretical corner): skip the reset while tasks are
> > > throttled on pfmemalloc_wait, so that it cannot defer the hopeless
> > > escape hatch in allow_direct_reclaim().
> >
> > I would keep this a separate patch with separate reasoning. Ideally with
> > some way to trigger the behavior and prove it makes any practical
> > meaning. Theoretical corner cases might backfire in this rather
> > convoluted area.
> >
>
> Thanks, makes sense - will drop it from this patch.
>
> Regarding the other suggestion in the Sashiko review, I will keep that
> one in: an atomic_read() check before the atomic_xchg(), to avoid taking
> the cache line exclusive for already-zero clears in kswapd_clear_hopeless().
While this is generally a good optimization for hot paths and cache
hotlines I am not sure this is really the case for kswapd_failures. Perf
data might prove me easily wrong...
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2026-07-16 8:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 2:44 [PATCH] mm/vmscan: clear hopeless kswapd when global direct reclaim makes progress Altan Hacigumus
2026-07-10 3:22 ` Andrew Morton
2026-07-10 4:04 ` Altan Hacigumus
2026-07-11 0:39 ` Andrew Morton
2026-07-14 11:34 ` Michal Hocko
2026-07-15 2:32 ` Altan Hacigumus
2026-07-15 7:12 ` Michal Hocko
2026-07-16 6:20 ` Altan Hacigumus
2026-07-16 8:16 ` Michal Hocko [this message]
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=aliTd8K5lqQZIX85@tiehlicka \
--to=mhocko@suse.com \
--cc=ahacigu.linux@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=jiayuan.chen@shopee.com \
--cc=kasong@tencent.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=qi.zheng@linux.dev \
--cc=rppt@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.