linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Gregory Price <gourry@gourry.net>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: Yang Shi <shy828301@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	kernel-team@meta.com, akpm@linux-foundation.org,
	weixugc@google.com, dave.hansen@linux.intel.com,
	osalvador@suse.de, stable@vger.kernel.org
Subject: Re: [PATCH] vmscan,migrate: fix double-decrement on node stats when demoting pages
Date: Tue, 29 Oct 2024 09:14:31 -0400	[thread overview]
Message-ID: <ZyDft_sCKm2vBF1j@PC2K9PVX.TheFacebook.com> (raw)
In-Reply-To: <87msinwxut.fsf@yhuang6-desk2.ccr.corp.intel.com>

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


  reply	other threads:[~2024-10-29 13:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25 14:17 Gregory Price
2024-10-28  4:39 ` Huang, Ying
2024-10-28  5:24 ` Shakeel Butt
2024-10-28 14:39   ` Gregory Price
2024-10-29  0:16     ` Huang, Ying
2024-10-28 16:05 ` Davidlohr Bueso
2024-10-28 20:45 ` Yang Shi
2024-10-28 21:25   ` Gregory Price
2024-10-29  0:34     ` Huang, Ying
2024-10-29 13:14       ` Gregory Price [this message]
2024-10-29  8:40 ` Oscar Salvador

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=ZyDft_sCKm2vBF1j@PC2K9PVX.TheFacebook.com \
    --to=gourry@gourry.net \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=shy828301@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=weixugc@google.com \
    --cc=ying.huang@intel.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