The patch titled Subject: /proc/kpageflags: return KPF_SLAB for slab tail pages has been added to the -mm tree. Its filename is proc-kpageflags-return-kpf_slab-for-slab-tail-pages.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/proc-kpageflags-return-kpf_slab-for-slab-tail-pages.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/proc-kpageflags-return-kpf_slab-for-slab-tail-pages.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Subject: /proc/kpageflags: return KPF_SLAB for slab tail pages Currently /proc/kpageflags returns just KPF_COMPOUND_TAIL for slab tail pages, which is inconvenient when grasping how slab pages are distributed (userspace always needs to check which kind of tail pages by itself). This patch sets KPF_SLAB for such pages. With this patch: $ grep Slab /proc/meminfo ; tools/vm/page-types -b slab Slab: 64880 kB flags page-count MB symbolic-flags long-symbolic-flags 0x0000000000000080 16220 63 _______S__________________________________ slab total 16220 63 16220 pages equals to 64880 kB, so returned result is consistent with the global counter. Signed-off-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Reviewed-by: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx> Cc: Konstantin Khlebnikov <koct9i@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/proc/page.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN fs/proc/page.c~proc-kpageflags-return-kpf_slab-for-slab-tail-pages fs/proc/page.c --- a/fs/proc/page.c~proc-kpageflags-return-kpf_slab-for-slab-tail-pages +++ a/fs/proc/page.c @@ -160,6 +160,8 @@ u64 stable_page_flags(struct page *page) u |= kpf_copy_bit(k, KPF_LOCKED, PG_locked); u |= kpf_copy_bit(k, KPF_SLAB, PG_slab); + if (PageTail(page) && PageSlab(compound_head(page))) + u |= 1 << KPF_SLAB; u |= kpf_copy_bit(k, KPF_ERROR, PG_error); u |= kpf_copy_bit(k, KPF_DIRTY, PG_dirty); _ Patches currently in -mm which might be from n-horiguchi@xxxxxxxxxxxxx are mm-madvise-pass-return-code-of-memory_failure-to-userspace.patch mm-madvise-update-comment-on-sys_madvise.patch proc-kpageflags-return-kpf_buddy-for-tail-buddy-pages.patch proc-kpageflags-return-kpf_slab-for-slab-tail-pages.patch tools-vm-page-typesc-support-swap-entry.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html