Skip to content

fs/proc: move page_mapcount() to fs/proc/internal.h

David Hildenbrand linux-doc linux-fsdevel linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 12 repliesIn review 5 of 6 applied

Patches in v1 5 of 6 applied

#Subject and filesSizeRepliesApplied
1/6fs/proc/task_mmu: indicate PM_FILE for PMD-mapped file THPfs/proc/task_mmu.c+2 -03 repliesApplied
2/6fs/proc/task_mmu: don't indicate PM_MMAP_EXCLUSIVE without PM_PRESENTfs/proc/task_mmu.c+2 -67 repliesApplied
3/6fs/proc/task_mmu: properly detect PM_MMAP_EXCLUSIVE per page of PMD-mapped THPsfs/proc/task_mmu.c+12 -101 replyApplied
4/6fs/proc/task_mmu: account non-present entries as "maybe shared, but no idea how often"fs/proc/task_mmu.c+31 -220 repliesApplied
5/6fs/proc: move page_mapcount() to fs/proc/internal.hfs/proc/internal.h fs/proc/page.c fs/proc/task_mmu.c +1 more+66 -500 replies
6/6Documentation/admin-guide/mm/pagemap.rst: drop "Using pagemap to do something useful"Documentation/admin-guide/mm/pagemap.rst+0 -210 repliesApplied

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchKirill A. ShutemovLance YangOscar Salvador
1/6A-b R-b R-b
2/6R-b
3/6R-b
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH v1 0/6] fs/proc: move page_mapcount() to fs/proc/internal.h

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 <[email protected]>
Cc Jonathan Corbet <[email protected]>

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

Signature · 1 line
2.45.2