public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Kairui Song <ryncsn@gmail.com>
To: Zhaoyang Huang <huangzhaoyang@gmail.com>
Cc: "zhaoyang.huang" <zhaoyang.huang@unisoc.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Axel Rasmussen <axelrasmussen@google.com>,
	Yuanchu Xie <yuanchu@google.com>,  Wei Xu <weixugc@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	 David Hildenbrand <david@kernel.org>,
	Michal Hocko <mhocko@kernel.org>,
	 Qi Zheng <zhengqi.arch@bytedance.com>,
	Matthew Wilcox <willy@infradead.org>,
	 Shakeel Butt <shakeel.butt@linux.dev>,
	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org,
	steve.kang@unisoc.com
Subject: Re: [PATCH] mm: skip dirty file folios during isolation of legacy LRU
Date: Mon, 23 Mar 2026 18:04:59 +0800	[thread overview]
Message-ID: <CAMgjq7B09M1X2FAtQX=HPTZjTO1=JdwQFZxLY5E+4OQ0S__gRw@mail.gmail.com> (raw)
In-Reply-To: <CAGWkznEoX2c79E7HiWMSv5Vk+Afg0P4rUgEO=gs1p65kBY-BfQ@mail.gmail.com>

On Mon, Mar 23, 2026 at 5:17 PM Zhaoyang Huang <huangzhaoyang@gmail.com> wrote:
>
> On Fri, Mar 20, 2026 at 5:20 PM Kairui Song <ryncsn@gmail.com> wrote:
> >
> > On Fri, Mar 20, 2026 at 4:34 PM zhaoyang.huang
> > <zhaoyang.huang@unisoc.com> wrote:
> > >
> > > From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> >
> > Hi Zhaoyang,
> >
> > > Since dirty file folios are no longer writeout in reclaiming after
> > > 'commit 84798514db50 ("mm: Remove swap_writepage() and
> > > shmem_writepage()")', there is no need to isolate them which could help
> > > to improve the scan efficiency and decrease the unnecessary TLB flush.
> >
> > But you are still isolating them with this patch, you just adjusted
> > where the statistical update happens.
> sorry, I missed the above information in previous feedback. No. The

Hi Zhaoyang

No worries, feel free to discuss anytime.

> dirty file folios are moved back to lruvec instead of being isolated
> under this patch. How about apply this only when isolate_lru_folios is
> called from shrink_active_list which has no worries about stuck the
> inactive list.

Hmm, No? Reading your code in isolate_lru_folios, you do "goto move"
when "folio_trylock" fails. But for "if (dirty || writeback)" folios,
you only do "nr_dirty += nr_pages;". Am I missing anything?

And as for the different behavior for active / inacitve isolation, I
don't know if that's a valid optimization worth the complicity, and
the worse part is it may break the dirty flush wake up logic, as
shrinker may never see any dirty writeback folios now.


      reply	other threads:[~2026-03-23 10:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20  8:33 [PATCH] mm: skip dirty file folios during isolation of legacy LRU zhaoyang.huang
2026-03-20  9:19 ` Kairui Song
2026-03-20  9:30   ` Zhaoyang Huang
2026-03-23  9:17   ` Zhaoyang Huang
2026-03-23 10:04     ` Kairui Song [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='CAMgjq7B09M1X2FAtQX=HPTZjTO1=JdwQFZxLY5E+4OQ0S__gRw@mail.gmail.com' \
    --to=ryncsn@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=huangzhaoyang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=steve.kang@unisoc.com \
    --cc=weixugc@google.com \
    --cc=willy@infradead.org \
    --cc=yuanchu@google.com \
    --cc=zhaoyang.huang@unisoc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox