From: Andrew Morton <akpm@linux-foundation.org>
To: Yongmei Xie <yongmeixie@hotmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, hannes@cmpxchg.org
Subject: Re: [PATCH] mm/workingset: don't count as refault (file/anon) if refault distance is too long
Date: Tue, 14 Sep 2021 20:39:08 -0700 [thread overview]
Message-ID: <20210914203908.bdb8fa924dce80e15f149457@linux-foundation.org> (raw)
In-Reply-To: <PSAPR02MB48530DF74EC51015F1C3ADACC5D89@PSAPR02MB4853.apcprd02.prod.outlook.com>
On Sun, 12 Sep 2021 19:54:47 +0800 Yongmei Xie <yongmeixie@hotmail.com> wrote:
> The current implementation count all the pages which have shadow entry in radix tree as
> the event of refault (page or anon). That means all the pages which have ever been
> cached in lru are counted as refault. But I think it's not 100% percent correct.
>
> Because usually inode has much longer life cycle than the pages belonging to it.
> So if the inode was accessed from time to time, then it won't be reclaimed unless much
> severe memory pressure happens.
>
> Then if page was reclaimed several days ago, when it's accessed again, it will be marked as
> refault event. Then page was reclaimed an hour ago, when it's accessed again, it will be
> marked as refault event as well. From the refault metric alone, I cannot tell whether the
> previous reclaim process has evicted some useful pages. That makes things worse in situation
> of proactive reclaim. We's like to known whehter the previous policy reclaim too much
> meaningful data other than working set transition. So we'd like see the refault rate, but it
> includes all the historical reclaim.
>
> >From my point of view, if the refaut distance is larger than file cache size, we don't
> have to count it refault at all. Because it's too long to be memorized down.
Thanks.
Do you have any runtime testing results which demonstrate a benefit?
prev parent reply other threads:[~2021-09-15 3:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-12 11:54 Yongmei Xie
2021-09-15 3:39 ` Andrew Morton [this message]
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=20210914203908.bdb8fa924dce80e15f149457@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox