linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Subject: Re: [PATCH v2] smaps: Report correct page sizes with THP
Date: Tue, 3 Mar 2026 08:04:27 -0800	[thread overview]
Message-ID: <aacGi1DEZoc00Sv7@tassilo> (raw)
In-Reply-To: <4a08a249-211b-40b9-b6bd-7c54af2b9d15@kernel.org>


BTW your comment earlier about partially mapped compound pages made 
me reconsider the code and unless I'm missing something the accounting
is all wrong for this case anyways in the current code.

The code currently calls smaps_account for every PTE, which will happily
account the complete compound page, but this will be repeated for each
PTE entry. So for the mTHP case when multiple contiguous PTEs point 
to the same page it will over count by the order.

This doesn't affect page size reporting, which is idempotent, but 
all the other mss counts in proc task_mmu.c.

-Andi


  parent reply	other threads:[~2026-03-03 16:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 23:27 Andi Kleen
2026-02-26 12:08 ` Usama Arif
2026-03-01 17:20   ` Andi Kleen
2026-02-26 17:31 ` David Hildenbrand (Arm)
2026-03-01 17:35   ` Andi Kleen
2026-03-02 19:29     ` David Hildenbrand (Arm)
2026-03-02 20:41       ` Andi Kleen
2026-03-02 21:05         ` David Hildenbrand (Arm)
2026-03-02 21:48           ` Andi Kleen
2026-03-03  9:05             ` David Hildenbrand (Arm)
2026-03-03  9:39             ` Lorenzo Stoakes
2026-03-03 15:34               ` Andi Kleen
2026-03-03 16:29                 ` Lorenzo Stoakes
2026-03-03 16:04           ` Andi Kleen [this message]
2026-03-03 16:14             ` David Hildenbrand (Arm)
2026-03-03  9:27 ` Lorenzo Stoakes

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=aacGi1DEZoc00Sv7@tassilo \
    --to=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.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