Re: [PATCH v2 1/7] fs/proc/page: remove unneeded PageTail && PageSlab check

From: Matthew Wilcox
Date: Fri Nov 10 2023 - 13:51:31 EST


On Fri, Nov 10, 2023 at 11:33:18AM +0800, Kefeng Wang wrote:
> After commit dcb351cd095a ("page-flags: define behavior SL*B-related
> flags on compound pages"), the slab could not be a tail, remove unneeded
> PageTail && PageSlab check.

No, that's completely wrong.

* PF_NO_TAIL:
* modifications of the page flag must be done on small or head pages,
* checks can be done on tail pages too.

That's backed up by the code:

#define PF_NO_TAIL(page, enforce) ({ \
VM_BUG_ON_PGFLAGS(enforce && PageTail(page), page); \
PF_POISONED_CHECK(compound_head(page)); })

(enforce is set to 0 for the 'test')

> Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>

NAK