Re: [PATCH v2 1/3] mm/page_owner: add filter infrastructure

SeongJae Park
2026-04-29T01:39:13Z

On Tue, 28 Apr 2026 09:13:03 -0400 Zi Yan <ziy@nvidia.com> wrote:

> On 27 Apr 2026, at 23:33, zhen.ni wrote:
>
> > 在 2026/4/27 23:35, Zi Yan 写道:
> >> On 19 Apr 2026, at 11:55, Zhen Ni wrote:
> >>
> >>> Add data structure for page_owner filtering functionality and create
> >>> debugfs directory for filter controls.
> >>>
> >>> This adds:
> >>> - enum page_owner_print_mode with values for full_stack and stack_handle
> >>> - struct page_owner_filter with print_mode and nid_mask fields
> >>> - Static owner_filter instance initialized with default values
> >>> - page_owner_filter debugfs directory
> >>>
> >>> The filter infrastructure will be used to add print_mode and NUMA node
> >>> filtering capabilities in subsequent commits.
> >>>
> >>> Link: https://lore.kernel.org/linux-mm/20260417154638.22370-2-zhen.ni@easystack.cn/
> >>> Suggested-by: Zi Yan <ziy@nvidia.com>
> >>> Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
> >>> ---
> >>>
> >>> Changes in v2:
> >>> - Use enum page_owner_print_mode instead of bool 'compact' for better clarity
> >>> - Use nodemask_t instead of int 'nid' to support multi-node filtering
> >>> ---
> >>> mm/page_owner.c | 20 +++++++++++++++++++-
> >>> 1 file changed, 19 insertions(+), 1 deletion(-)
> >>
> >> The patch can be folded into Patch 2. Otherwise, these new types are not
> >> used and page_owner_filter folder is just empty.
> >>
> >
> >
> > Thanks for your review and suggestion.
> >
> > I kept the 3-patch structure mainly for clear functional separation,
> > which also makes review easier. Patch 1 adds the infrastructure,
>
> What is the point of adding unused code in a separate patch?
> Patch 1 has no functional addition and should be part of Patch 2.

I agree.

While I was reviewing the v3 of this series, I had to move between the patch 2
and patch 1 to check the value of the print_mode enum. Having those on single
patch will be easier to read for people like me.

Thanks,
SJ …