From: Johannes Weiner <hannes@cmpxchg.org>
To: Yuanchu Xie <yuanchu@google.com>
Cc: Deepanshu Kartikey <kartikey406@gmail.com>,
akpm@linux-foundation.org, axelrasmussen@google.com,
weixugc@google.com, david@kernel.org, mhocko@kernel.org,
zhengqi.arch@bytedance.com, shakeel.butt@linux.dev,
lorenzo.stoakes@oracle.com, yuzhao@google.com,
heftig@archlinux.org, oleksandr@natalenko.name,
bgeffon@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
syzbot+90fcab4d88cffed6d0d8@syzkaller.appspotmail.com
Subject: Re: [PATCH] mm: vmscan: always allow writeback during memcg reclaim
Date: Mon, 15 Dec 2025 15:22:12 -0500 [thread overview]
Message-ID: <20251215202212.GD905277@cmpxchg.org> (raw)
In-Reply-To: <CAJj2-QHV09Rh+s2AgDtC815YUJUnYgTs0EE9YbDvXdPM9DsKug@mail.gmail.com>
On Mon, Dec 15, 2025 at 01:42:27PM -0600, Yuanchu Xie wrote:
> On Sun, Dec 14, 2025 at 10:52 PM Deepanshu Kartikey
> <kartikey406@gmail.com> wrote:
> >
> > On Mon, Dec 15, 2025 at 9:42 AM Johannes Weiner <hannes@cmpxchg.org> wrote:
> >
> > > > Fixes: bd74fdaea146 ("mm: multi-gen LRU: support page table walks")
> > >
> > > That seems unrelated?
> >
> > Sorry for the wrong fixes. Correct Fixes: ee814fe23daf ("mm: vmscan:
> > clean up struct scan_control")
> >
> > I'll wait for input from someone with MGLRU context on the broader discussion.
> >
> This warning came from commit e9d4e1ee7880 ("mm: multi-gen LRU:
> clarify scan_control flags") [1].
>
> The original rationale:
> > 4. sc->may_writepage and sc->may_unmap, which indicates opportunistic
> > reclaim, are rejected, since unmapped clean folios are already
> > prioritized. Scanning for more of them is likely futile and can
> > cause high reclaim latency when there is a large number of memcgs.
>
> As far as I can tell this was a sanity check to ensure
> `lru_gen_shrink_lruvec` avoids extra work for minimal gain. Perhaps
> this shouldn't be a warning? Always setting may_writepage in this case
> would free more folios. I'm not against removing the warning either.
The premise doesn't seem correct. Aside from laptop_mode, they're used
in those scenarios:
- zone_reclaim_mode: local node is full and user would prefer clean
and/or unmapped pages over spilling to remote nodes
- watermark_boost: the page allocator finds itself in a situation
where it needs to fragment pageblocks, and it calls for additional
reclaim to get out of that situation
Neither of them are opportunistic. It's user-requested behavior.
next prev parent reply other threads:[~2025-12-15 20:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-13 8:36 [PATCH] mm: vmscan: always allow writeback during memcg reclaim Deepanshu Kartikey
2025-12-14 23:49 ` Andrew Morton
2025-12-15 4:12 ` Johannes Weiner
2025-12-15 4:51 ` Deepanshu Kartikey
2025-12-15 19:42 ` Yuanchu Xie
2025-12-15 20:22 ` Johannes Weiner [this message]
2025-12-19 5:13 ` Kairui Song
2025-12-15 6:59 ` retiring laptop_mode? was " Christoph Hellwig
2025-12-15 16:33 ` Jens Axboe
2025-12-15 20:08 ` Johannes Weiner
2025-12-16 2:23 ` Jens Axboe
2025-12-16 7:41 ` Christoph Hellwig
2025-12-16 18:52 ` Johannes Weiner
2025-12-16 18:54 ` Jens Axboe
2025-12-16 23:23 ` Shakeel Butt
2025-12-17 19:59 ` Johannes Weiner
2025-12-18 7:21 ` Shakeel Butt
2025-12-17 19:34 ` Michal Hocko
2025-12-18 6:00 ` Christoph Hellwig
2025-12-15 17:49 ` Michal Hocko
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=20251215202212.GD905277@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=bgeffon@google.com \
--cc=david@kernel.org \
--cc=heftig@archlinux.org \
--cc=kartikey406@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@kernel.org \
--cc=oleksandr@natalenko.name \
--cc=shakeel.butt@linux.dev \
--cc=syzbot+90fcab4d88cffed6d0d8@syzkaller.appspotmail.com \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=yuzhao@google.com \
--cc=zhengqi.arch@bytedance.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.