linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Andi Kleen <ak@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	Zi Yan <ziy@nvidia.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	"Liam R . Howlett" <Liam.Howlett@oracle.com>,
	Nico Pache <npache@redhat.com>, Dev Jain <dev.jain@arm.com>,
	Barry Song <baohua@kernel.org>, Lance Yang <lance.yang@linux.dev>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Usama Arif <usamaarif642@gmail.com>
Subject: Re: [PATCH v1] docs: filesystems: clarify KernelPageSize vs. MMUPageSize in smaps
Date: Thu, 5 Mar 2026 09:45:49 +0100	[thread overview]
Message-ID: <650cda1b-bc15-4d41-b6f1-d85ded0c7872@kernel.org> (raw)
In-Reply-To: <aaiUmx8yRsn2LBMW@tassilo>

On 3/4/26 21:22, Andi Kleen wrote:
> On Wed, Mar 04, 2026 at 04:56:36PM +0100, David Hildenbrand (Arm) wrote:
>> There was recently some confusion around THPs and the interaction with
>> KernelPageSize / MMUPageSize. Historically, these entries always
>> correspond to the smallest size we could encounter, not any current
>> usage of transparent huge pages or larger sizes used by the MMU.
> 
> It still seems like a bug to me, only documented now, but seems
> I'm in the minority on that.

I'd agree that something smarter and more future proof should have been
done if THPs wouldn't have been added (checks notes) 15 years ago and
how KernelPageSize / MMUPageSize behaves and what it means would already
be set in stone for a long time.

People decided to add things like "AnonHugePages" (which I also detest,
but here we are) instead.

I wish we would have never exposed MMUPageSize (in 2009) to handle some
ppc oddity.

While digging through some history, there were earlier conclusions
(around 10 years ago) that MMUPageSize [1] is not a good fit, and people
even tried exposing actual amounts (Ptes@4kB, Ptes@2MB). I don't think
that's the right approach either for various reasons raised already
(e.g., doesn't really tell you the full TLB/MMU story).

> 
> But anyways if you change this file you should probably remove
> the duplicated KernelPageSize/MMUPageSize entries in the example
> too. That triped me up the last time.

Good point. I also discovered that that PPC64 thing is still in place
(maybe it's dead code, but at least code-wise, it's not a thing from the
past ).

[1] https://lkml.org/lkml/2016/11/29/882

-- 
Cheers,

David


  reply	other threads:[~2026-03-05  8:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 15:56 David Hildenbrand (Arm)
2026-03-04 16:04 ` Zi Yan
2026-03-04 20:22 ` Andi Kleen
2026-03-05  8:45   ` David Hildenbrand (Arm) [this message]
2026-03-05  3:21 ` Lance Yang
2026-03-05  9:03 ` Vlastimil Babka
2026-03-05 10:46 ` Lorenzo Stoakes (Oracle)

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=650cda1b-bc15-4d41-b6f1-d85ded0c7872@kernel.org \
    --to=david@kernel.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=corbet@lwn.net \
    --cc=dev.jain@arm.com \
    --cc=lance.yang@linux.dev \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=npache@redhat.com \
    --cc=skhan@linuxfoundation.org \
    --cc=usamaarif642@gmail.com \
    --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