proc: rewrite stable_page_flags()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 26 Mar 2024 17:10:32 +0000 (17:10 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Apr 2024 03:56:15 +0000 (20:56 -0700)
commitdee3d0bef2b00772be430425832ead6aa9d707f9
tree16fd8ec09f41bea6e02d6e441843513d78a9a35c
parent4dc7d37370951fe86216f03a4e0a6909f9b90a8c
proc: rewrite stable_page_flags()

Reduce the usage of PageFlag tests and reduce the number of
compound_head() calls.

For multi-page folios, we'll now show all pages as having the flags that
apply to them, e.g.  if it's dirty, all pages will have the dirty flag set
instead of just the head page.  The mapped flag is still per page, as is
the hwpoison flag.

[willy@infradead.org: fix up some bits vs masks]
Link: https://lkml.kernel.org/r/20240403173112.1450721-1-willy@infradead.org
[willy@infradead.org: fix warnings]
Link: https://lkml.kernel.org/r/ZhBPtCYfSuFuUMEz@casper.infradead.org
Link: https://lkml.kernel.org/r/20240326171045.410737-11-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Svetly Todorov <svetly.todorov@memverge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/page.c
include/linux/huge_mm.h
include/linux/page-flags.h
tools/cgroup/memcg_slabinfo.py