Re: [PATCH v1 2/3] /proc/kpageflags: return KPF_SLAB for slab tail pages

From: Vladimir Davydov
Date: Thu Feb 04 2016 - 11:43:51 EST


On Thu, Feb 04, 2016 at 04:08:02PM +0900, Naoya Horiguchi wrote:
> 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>