Re: [PATCH] vmscan,migrate: fix double-decrement on node stats when demoting pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 29, 2024 at 08:34:34AM +0800, Huang, Ying wrote:
> Gregory Price <gourry@xxxxxxxxxx> 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@xxxxxxxxxx> 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




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux