linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Zhu (Kernel)" <alexlzhu@fb.com>
To: Zi Yan <ziy@nvidia.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	Matthew Wilcox <willy@infradead.org>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"riel@surriel.com" <riel@surriel.com>,
	Kernel Team <Kernel-team@fb.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 3/3] mm: THP low utilization shrinker
Date: Mon, 29 Aug 2022 20:49:31 +0000	[thread overview]
Message-ID: <12F2BA64-E7F8-49C6-B062-96DF48DF0192@fb.com> (raw)
In-Reply-To: <4BA28B97-9E5C-4CF5-B6E1-A6AD27A1B6AC@nvidia.com>


> How stale could the information in the utilization bucket be?

The staleness would be capped by the duration of the scan, 70s in in the 
example.  

> Is it possible that THP shrinker splits a THP used to have a lot of
> zero-filled subpages but now have all subpages filled with useful
> values?

This is possible, but we free only the zero pages, which cannot have
any useful values. How often it happens that THPs move utilization buckets 
should be workload dependent. 

> In Patch 2, split_huge_page() only unmap zero-filled subpages,
> but for THP shrinker, should it verify the utilization before it
> splits the page?

I think we should add this check to verify that it is still in the lowest bucket before having the
shrinker split the page. The utilization could have changed and this way we do not
need to worry about workloads where THPs move utilization buckets. Thanks! 


      reply	other threads:[~2022-08-29 20:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 21:30 [RFC 0/3] THP Shrinker alexlzhu
2022-08-25 21:30 ` [RFC 1/3] mm: add thp_utilization metrics to debugfs alexlzhu
2022-08-27  0:11   ` Zi Yan
2022-08-29 20:19     ` Alex Zhu (Kernel)
2022-08-25 21:30 ` [RFC 2/3] mm: changes to split_huge_page() to free zero filled tail pages alexlzhu
2022-08-26 10:18   ` David Hildenbrand
2022-08-26 18:34     ` Alex Zhu (Kernel)
2022-08-26 21:18     ` Rik van Riel
2022-08-29 10:02       ` David Hildenbrand
2022-08-29 13:17         ` Rik van Riel
2022-08-30 12:33           ` David Hildenbrand
2022-08-30 21:54             ` Alex Zhu (Kernel)
2022-08-25 21:30 ` [RFC 3/3] mm: THP low utilization shrinker alexlzhu
2022-08-27  0:25   ` Zi Yan
2022-08-29 20:49     ` Alex Zhu (Kernel) [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=12F2BA64-E7F8-49C6-B062-96DF48DF0192@fb.com \
    --to=alexlzhu@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@surriel.com \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.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;
as well as URLs for NNTP newsgroup(s).