[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZyDft_sCKm2vBF1j@PC2K9PVX.TheFacebook.com>
Date: Tue, 29 Oct 2024 09:14:31 -0400
From: Gregory Price <gourry@...rry.net>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: Yang Shi <shy828301@...il.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, kernel-team@...a.com, akpm@...ux-foundation.org,
weixugc@...gle.com, dave.hansen@...ux.intel.com, osalvador@...e.de,
stable@...r.kernel.org
Subject: Re: [PATCH] vmscan,migrate: fix double-decrement on node stats when
demoting pages
On Tue, Oct 29, 2024 at 08:34:34AM +0800, Huang, Ying wrote:
> Gregory Price <gourry@...rry.net> writes:
>
> > On Mon, Oct 28, 2024 at 01:45:48PM -0700, Yang Shi wrote:
> >> On Fri, Oct 25, 2024 at 7:17 AM Gregory Price <gourry@...rry.net> wrote:
> >> >
> >> > This path happens for SUCCESSFUL migrations, not failures. Typically
> >> > callers to migrate_pages are required to handle putback/accounting for
> >> > failures, but this is already handled in the shrink code.
> >>
> >> AFAIK, MGLRU doesn't dec/inc this counter, so it is not
> >> double-decrement for MGLRU. Maybe "imbalance update" is better?
> >> Anyway, it is just a nit. I'd suggest capturing the MGLRU case in the
> >> commit log too.
> >>
> >
> > Gotcha, so yeah saying it's an imbalance fix is more accurate.
> >
> > So more accurate changelog is:
...
>
> I think that it may be better to mention the different behavior of LRU
> and MGLRU. But that's not a big deal, change it again only if you think
> it's necessary.
>
The behavior isn't really different. It's either way migrate_pages decrements
when it shouldn't going through the shink code - and both LRU and MGLRU go
through the same code. That LRU does an inc/dec pair is irrelevant - neither
should do the decrement in the migrate path.
~Gregory
Powered by blists - more mailing lists