Re: [PATCH v1 1/2] mm: Cleanup count_mthp_stat() definition

From: David Hildenbrand
Date: Fri Jul 12 2024 - 21:05:10 EST


On 11.07.24 09:29, Ryan Roberts wrote:
Let's move count_mthp_stat() so that it's always defined, even when THP
is disabled. Previously uses of the function in files such as shmem.c,
which are compiled even when THP is disabled, required ugly THP
ifdeferry. With this cleanup, we can remove those ifdefs and the
function resolves to a nop when THP is disabled.

I shortly plan to call count_mthp_stat() from more THP-invariant source
files.

Signed-off-by: Ryan Roberts <ryan.roberts@xxxxxxx>
---

Acked-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb