Re: [PATCH] mm: mark folio as workingset in lru_deactivate_fn

From: Johannes Weiner
Date: Thu Mar 30 2023 - 05:32:38 EST


On Thu, Mar 30, 2023 at 09:38:48AM +0800, Zhaoyang Huang wrote:
> On Wed, Mar 29, 2023 at 10:55 PM Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
> >
> > On Wed, Mar 29, 2023 at 06:47:35PM +0800, zhaoyang.huang wrote:
> > > From: Zhaoyang Huang <zhaoyang.huang@xxxxxxxxxx>
> > >
> > > folio will skip of being set as workingset in lru_deactivate_fn.
> >
> > Can you please elaborate why that's undesirable? What's the problem
> > you're fixing?
> If I am correct, folio will skip being set as workingset when moving
> from active lru to inactive lru, which is performed on every folio in
> shrink_active_list during normal reclaim.

shrink_active_list directly calls folio_set_workingset(). The function
you're editing is used for things like MADV_COLD and truncate().

It sounds like there is just a misunderstanding of the code, not an
actual problem.