Re: [PATCH v2 14/14] mm/page-flags: remove PG_private

From: Steven Rostedt

Date: Tue Sep 01 2026 - 13:39:36 EST


On Mon, 31 Aug 2026 15:25:37 -0400
Zi Yan <ziy@xxxxxxxxxx> wrote:

> diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h
> index 935893e5ea53b..caf090cd6f85e 100644
> --- a/include/trace/events/mmflags.h
> +++ b/include/trace/events/mmflags.h
> @@ -144,7 +144,7 @@ TRACE_DEFINE_ENUM(___GFP_LAST_BIT);
> DEF_PAGEFLAG_NAME(owner_2), \
> DEF_PAGEFLAG_NAME(arch_1), \
> DEF_PAGEFLAG_NAME(reserved), \
> - DEF_PAGEFLAG_NAME(private), \
> + { 1UL << __PG_folio, "folio" }, \
> DEF_PAGEFLAG_NAME(private_2), \
> DEF_PAGEFLAG_NAME(writeback), \
> DEF_PAGEFLAG_NAME(head), \

Hmm, just for consistency sake, can we create a:

#define __DEF_PAGEFLAG_NAME(_name) { 1UL << __PG_##_name, __stringify(_name) }

Which is similar to:

#define DEF_PAGEFLAG_NAME(_name) { 1UL << PG_##_name, __stringify(_name) }

But adds the "__" to the name. Then the above would look like:

DEF_PAGEFLAG_NAME(reserved), \
__DEF_PAGEFLAG_NAME(folio), \
DEF_PAGEFLAG_NAME(private_2), \
DEF_PAGEFLAG_NAME(writeback), \

Where the __DEF_PAGEFLAG_NAME() with the "__" still stands out, but the
code looks better than open coding it in the middle and making one wonder
why it was open coded. (It took me a bit to noticed the "__" difference.)

-- Steve