|
|
Log in / Subscribe / Register

mm, swap: Enable THP SWAP for PowerPC Book3S64

From:  "Ritesh Harjani (IBM)" <ritesh.list-AT-gmail.com>
To:  linux-mm-AT-kvack.org
Subject:  [RFC 0/4] mm, swap: Enable THP SWAP for PowerPC Book3S64
Date:  Tue, 09 Jun 2026 18:49:30 +0530
Message-ID:  <cover.1781000840.git.ritesh.list@gmail.com>
Cc:  Madhavan Srinivasan <maddy-AT-linux.ibm.com>, Michael Ellerman <mpe-AT-ellerman.id.au>, Nicholas Piggin <npiggin-AT-gmail.com>, Christophe Leroy <chleroy-AT-kernel.org>, Andrew Morton <akpm-AT-linux-foundation.org>, Chris Li <chrisl-AT-kernel.org>, Kairui Song <kasong-AT-tencent.com>, Kemeng Shi <shikemeng-AT-huaweicloud.com>, Nhat Pham <nphamcs-AT-gmail.com>, Baoquan He <baoquan.he-AT-linux.dev>, Barry Song <baohua-AT-kernel.org>, Youngjun Park <youngjun.park-AT-lge.com>, David Hildenbrand <david-AT-kernel.org>, linuxppc-dev-AT-lists.ozlabs.org, linux-kernel-AT-vger.kernel.org, Sayali Patil <sayalip-AT-linux.ibm.com>, "Ritesh Harjani (IBM)" <ritesh.list-AT-gmail.com>
Archive-link:  Article

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 for e.g. to size some of its array data structures based on PMD_ORDER.
This patch series makes that usage dependent on the runtime variable.

Sayali did some performance runs of this on Book3S64 with Radix and it gives
40-50% performance improvement. We also plan to run it with Hash, will soon
update the results.

Note that this patch series is based out of linux-next (next-20260608).

Ritesh Harjani (IBM) (4):
  include/linux/swap.h: Remove unused leftovers
  mm, swap: make SWAPFILE_CLUSTER runtime
  mm, swap: make SWAP_NR_ORDERS runtime
  powerpc: Kconfig: Enable THP_SWAP on Book3S64

 arch/powerpc/platforms/Kconfig.cputype |   1 +
 include/linux/swap.h                   |  17 +---
 mm/swap.h                              |   5 +-
 mm/swap_table.h                        |   6 +-
 mm/swapfile.c                          | 132 ++++++++++++++++++-------
 5 files changed, 106 insertions(+), 55 deletions(-)

--
2.39.5




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds