Hi everyone,
This patchset addresses 2 issues in /proc/kpageflags.
1. We can't easily tell folio from thp, because currently both pages are
judged as thp, and
2. we see some garbage data in records of compound tail pages because
we use tail pages to store some internal data.
These issues require userspace programs to do additional work to understand
the page status, which makes situation more complicated.
This patchset tries to solve these by defining KPF_FOLIO for issue 1., and
by hiding part of page flag info on tail pages of compound pages for issue 2.
I think that technically some compound pages like thp/hugetlb/slab could be
considered as folio, but in this version KPF_FOLIO is set only on folios
in pagecache (so "folios in narrower meaning"). I'm not confident about
this choice, so if you have any idea about this, please let me know.