All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: "解 咏梅" <yongmeixie@hotmail.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 回复: [PATCH] mm:vmscan: fix extra adjustment for lruvec's nonresident_age in case of reactivation
Date: Fri, 1 Oct 2021 12:43:56 -0400	[thread overview]
Message-ID: <YVc6zOy51aaRgw2y@cmpxchg.org> (raw)
In-Reply-To: <TYYP286MB11150330E283CC23CB16E40CC5A29@TYYP286MB1115.JPNP286.PROD.OUTLOOK.COM>

On Wed, Sep 22, 2021 at 02:27:24PM +0000, 解 咏梅 wrote:
> But now, move_pages_to_lru didn't increase nonresident age for active rotation.
> Back toinactive age, VM ONLY care about the pages left inactive lru, AKA activation and reclaiming.
> Anyway reactivation is rare case, so whatever it contributes to nonresident age or not is ok to me.
> 
> But I am interested the logic how to guess the pages will be referenced again in the future.
> If active reactivation does matter to nonresident age. why not active rotation? But, currently it doesn't.

Can you point me to the code you're referring to? Looking at
move_pages_to_lru(), any pages with PageActive() set count toward the
non-resident age. That means activations from the inactive list, as
well as rotations on the active list, increase the nonresident age.

As to your question which one is right: the original workingset patch
was wrong not to count activations and reactivations. If we see a page
referenced in memory, it means it's hotter than the page that's not
refaulting -> nonresident age increses.

So the code as it is now looks correct to me.

Thanks

  parent reply	other threads:[~2021-10-01 16:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-19 15:25 [PATCH] mm:vmscan: fix extra adjustment for lruvec's nonresident_age in case of reactivation Yongmei Xie
2021-09-20  3:11 ` 回复: " 解 咏梅
2021-09-21 14:48 ` Johannes Weiner
     [not found]   ` <TYYP286MB11150330E283CC23CB16E40CC5A29@TYYP286MB1115.JPNP286.PROD.OUTLOOK.COM>
2021-10-01 16:43     ` Johannes Weiner [this message]
     [not found]       ` <TYYP286MB1115E3D67A88FFF1BFB68996C5B19@TYYP286MB1115.JPNP286.PROD.OUTLOOK.COM>
2021-10-07 16:34         ` 回复: 回复: " Johannes Weiner

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=YVc6zOy51aaRgw2y@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=yongmeixie@hotmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.