Re: [PATCH v4 1/3] mm, swap: make SWAPFILE_CLUSTER runtime
From: Barry Song <baohua@kernel.org>
Date: 2026-06-23 08:44:28
Also in:
linux-mm, lkml
From: Barry Song <baohua@kernel.org>
Date: 2026-06-23 08:44:28
Also in:
linux-mm, lkml
On Fri, Jun 19, 2026 at 12:41 PM Ritesh Harjani (IBM) [off-list ref] wrote:
On PowerPC Book3S64, MMU is selected at runtime, so macros like PMD_SHIFT are effectively runtime variables in the Book3S64 code. THP swap code uses these macros to size some of its array data structures based on PMD_ORDER e.g. SWAPFILE_CLUSTER macro is used for this very purpose. Hence this patch makes the users of SWAPFILE_CLUSTER to use this macro value at runtime and also modifies swap_table and swap_memcg_table which were earlier using this macro for defining the number of table entries. Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> ---
Reviewed-by: Barry Song <baohua@kernel.org>