linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/6] fs/proc: move page_mapcount() to fs/proc/internal.h
@ 2024-06-07 12:23 David Hildenbrand
  2024-06-07 12:23 ` [PATCH v1 1/6] fs/proc/task_mmu: indicate PM_FILE for PMD-mapped file THP David Hildenbrand
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: David Hildenbrand @ 2024-06-07 12:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, linux-doc, linux-fsdevel, David Hildenbrand,
	Andrew Morton, Jonathan Corbet

With all other page_mapcount() users in the tree gone, move
page_mapcount() to fs/proc/internal.h, rename it and extend the
documentation to prevent future (ab)use.

... of course, I find some issues while working on that code that I sort
first ;)

We'll now only end up calling page_mapcount()
[now folio_precise_page_mapcount()] on pages mapped via present page table
entries. Except for /proc/kpagecount, that still does questionable things,
but we'll leave that legacy interface as is for now.

Did a quick sanity check. Likely we would want some better selfestest
for /proc/$/pagemap + smaps. I'll see if I can find some time to write
some more.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jonathan Corbet <corbet@lwn.net>

David Hildenbrand (6):
  fs/proc/task_mmu: indicate PM_FILE for PMD-mapped file THP
  fs/proc/task_mmu: don't indicate PM_MMAP_EXCLUSIVE without PM_PRESENT
  fs/proc/task_mmu: properly detect PM_MMAP_EXCLUSIVE per page of
    PMD-mapped THPs
  fs/proc/task_mmu: account non-present entries as "maybe shared, but no
    idea how often"
  fs/proc: move page_mapcount() to fs/proc/internal.h
  Documentation/admin-guide/mm/pagemap.rst: drop "Using pagemap to do
    something useful"

 Documentation/admin-guide/mm/pagemap.rst |  21 -----
 fs/proc/internal.h                       |  33 ++++++++
 fs/proc/page.c                           |  21 +++--
 fs/proc/task_mmu.c                       | 102 +++++++++++++----------
 include/linux/mm.h                       |  27 +-----
 5 files changed, 104 insertions(+), 100 deletions(-)


base-commit: 19b8422c5bd56fb5e7085995801c6543a98bda1f
-- 
2.45.2


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-06-11 11:15 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-07 12:23 [PATCH v1 0/6] fs/proc: move page_mapcount() to fs/proc/internal.h David Hildenbrand
2024-06-07 12:23 ` [PATCH v1 1/6] fs/proc/task_mmu: indicate PM_FILE for PMD-mapped file THP David Hildenbrand
2024-06-07 13:21   ` Kirill A . Shutemov
2024-06-07 13:36   ` Lance Yang
2024-06-10  4:32   ` Oscar Salvador
2024-06-07 12:23 ` [PATCH v1 2/6] fs/proc/task_mmu: don't indicate PM_MMAP_EXCLUSIVE without PM_PRESENT David Hildenbrand
2024-06-10  4:38   ` Oscar Salvador
2024-06-11  7:13     ` Oscar Salvador
2024-06-11 10:51       ` David Hildenbrand
2024-06-11 10:45     ` David Hildenbrand
2024-06-10  4:49   ` Oscar Salvador
2024-06-11 10:50     ` David Hildenbrand
2024-06-11 11:15       ` Oscar Salvador
2024-06-07 12:23 ` [PATCH v1 3/6] fs/proc/task_mmu: properly detect PM_MMAP_EXCLUSIVE per page of PMD-mapped THPs David Hildenbrand
2024-06-10  4:51   ` Oscar Salvador
2024-06-07 12:23 ` [PATCH v1 4/6] fs/proc/task_mmu: account non-present entries as "maybe shared, but no idea how often" David Hildenbrand
2024-06-07 12:23 ` [PATCH v1 5/6] fs/proc: move page_mapcount() to fs/proc/internal.h David Hildenbrand
2024-06-07 12:23 ` [PATCH v1 6/6] Documentation/admin-guide/mm/pagemap.rst: drop "Using pagemap to do something useful" David Hildenbrand
2024-06-07 13:18 ` [PATCH v1 0/6] fs/proc: move page_mapcount() to fs/proc/internal.h Oscar Salvador

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).