Re: [PATCH v2] mm: swap: Call count_mthp_stat() outside ifdef CONFIG_TRANSPARENT_HUGEPAGE.

From: Andrew Morton
Date: Wed Oct 02 2024 - 16:36:52 EST


On Wed, 2 Oct 2024 12:55:47 -0700 Kanchana P Sridhar <kanchana.p.sridhar@xxxxxxxxx> wrote:

> This patch moves the call to count_mthp_stat() in count_swpout_vm_event()
> and in shrink_folio_list() to be outside the
> "ifdef CONFIG_TRANSPARENT_HUGEPAGE"

This is very apparent from reading the patch. Changelogs and code
comments should explain "why", and avoid explaining "what".

> based on changes made in commit
> 246d3aa3e531 ("mm: cleanup count_mthp_stat() definition").

And I don't think that explains the reasons for this change either.

So please resend with a changelog which fully explains the reasons for
making this alteration.