public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	akpm@linux-foundation.org
Subject: Re: [PATCH] smaps: Report correct page sizes with THP
Date: Mon, 9 Feb 2026 12:10:37 -0800	[thread overview]
Message-ID: <aYo_PWYK5ezWLoO6@tassilo> (raw)
In-Reply-To: <aYo91kREDEIsM60V@casper.infradead.org>

On Mon, Feb 09, 2026 at 08:04:38PM +0000, Matthew Wilcox wrote:
> On Mon, Feb 09, 2026 at 11:32:23AM -0800, Andi Kleen wrote:
> > +	} else {
> > +		unsigned ps = vma_mmu_pagesize(vma);
> > +		/* Will need adjustments when more THP page sizes are added. */
> > +		SEQ_PUT_DEC(" kB\nMMUPageSize:    ", ps);
> > +		if (mss.shmem_thp + mss.file_thp + mss.anonymous_thp > 0 &&
> > +		    ps != HPAGE_PMD_SIZE)
> > +			SEQ_PUT_DEC(" kB\nMMUPageSize2:   ", HPAGE_PMD_SIZE);
> > +	}
> 
> I'm not a fan of adding support for just two page sizes when we already
> know that we need to support many.  Particularly not with such an
> uninformative name as "MMUPageSize2".

What is uninformative about it? 

I intentionally used the number to make it extensible for the future,
you can add MMUPageSize3 and 4 and beyond, although the current code doesn't
implement it.

> 
> Something like MMUOtherPageSizes: 64Kib,256KiB,2MiB would work for me.
> But maybe other people have better ideas.

I considered just adding the numbers to a single line (the existing one),
but the risk of breaking some existing parser seemed too high. No other entry
in smaps has multiple numbers, and it seems to be against standard /proc
conventions.

-Andi

  reply	other threads:[~2026-02-09 20:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 19:32 [PATCH] smaps: Report correct page sizes with THP Andi Kleen
2026-02-09 20:04 ` Matthew Wilcox
2026-02-09 20:10   ` Andi Kleen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-02-09 20:17 Andi Kleen
2026-02-12 12:42 ` David Hildenbrand (Arm)
2026-02-12 17:58   ` Andi Kleen
2026-02-12 18:05     ` David Hildenbrand (Arm)
2026-02-21  0:03 ` jane.chu

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=aYo_PWYK5ezWLoO6@tassilo \
    --to=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@vger.kernel.org \
    --cc=willy@infradead.org \
    /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