From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53EE42D949C for ; Fri, 19 Jun 2026 04:41:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781844100; cv=none; b=mQ5iuj1UVcTMDzYuQs4thDeB5QIqEhD+r/ndpRK074JBX0uv2T/rScuD/if8WtRE7RwJ1OvuL5TsHaXpIvCWgmtccEkY/zOo7sFrbD8++PaGuiQZNwucsCg05xvh1uFcsNg5gsxB+WnYQg2432/N3c2qwn0Z7FtK9+5d24IwYJw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781844100; c=relaxed/simple; bh=O+pHJtqk6l8zd1ymbEsDsw/HdOWzS2mfIW1XwjPjzU0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NI4eDJvOREfOQY05Hn1SvEv7CRd3IHaUAv+X6x5SxTzEATiPzLNhDRCEb4xYNi6qqBG3VqqOka+k1T0E+1BOvRbhFF0L11/LQnyfm44uCrEbqjDNdRtSZ9VmhSTAKORtRisgQAAKPlT6OnZIAV1SH+WluZPiYlk8FgeIaLWU/T0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=H5nFAWI0; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H5nFAWI0" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2bf20f6be6bso11666195ad.3 for ; Thu, 18 Jun 2026 21:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781844099; x=1782448899; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I5UsMmNx5K2MhulwAdPqrD4ef826gnyJGcd1eOHt5Pg=; b=H5nFAWI0EHCQE9nypEmfY/i3OlM2Ksp5gqX08/28NT2NTkQfozHT2yu0qgxLFav/jS yxyTusgY+c+IjQveMEyGBbyccv/xZD0YtLFMtnGzpAd2Qboa0gIEfC/A0CTYxesq16OB HulB+O5sBekdNIWvDDMBt819vfRV7lffeYvrtBVIgiegGkRt51W3b93XK2A9Jeb0cEFi ACEA1C3DFZ62ui8FS9xGodsAMwy/+goK8EnJlyVWXj/0gq6EE3eCXPFU6X5sjivYRluL hhmEnuYcIycOmL3csi24ceVI6jqHv0+bYr6xeFhpPzEWX38WGqojlNtwhXKEtDqkd8qM dclA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781844099; x=1782448899; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=I5UsMmNx5K2MhulwAdPqrD4ef826gnyJGcd1eOHt5Pg=; b=odQlaNV749ocuheCmA3hkAhfi8uYm4PnGkahBZ+RviB1zoIUtSPAGsCK7xZmko3nrW qNzm3UI3uzaBsFQwQYSD1nyBum92Ca4WJVkkgJ58NvKhx2QXP3vUFpXMwuM2K1CRGxc1 IJ391qy7L1xIjZ4Tr2yfj9KNbZ7BvFbejjfl3T5Q16ZBf8fKa9uXNdnEAQKyysVuOoqF 0Sc1m10CXAy1c5qDY5IoG4gnbtjPTVLiKMIaTC9yss4JTkFefLIBiz8V6dBGERWXabeI ope+dryy2B8u4IXCLYIkkxalrDrw/xfP2vX9Vlao65JNoKLRJvyaghRdQ+bvXUOp95fC 3QHA== X-Forwarded-Encrypted: i=1; AFNElJ/1OnDvq77fKVdg6+pEAe/R5d9FI0fcp1RJZmqY0Bj1WyoTXhwp3ItPP3Z+PcnrNgF1z25HVp3UWj1RCk0=@vger.kernel.org X-Gm-Message-State: AOJu0YwfUbS2afj0Qq1xHH+vWBtb9LdVftav1vKDJD1Fu6tKP6dCbArK 2BYRBa8u1gswAfqHb1uDys0wXzAsakk2syb8FDnvHKCOJSIhXxa2WMJt X-Gm-Gg: AfdE7clJIrtvfwWeHn2ixdPS5htIPSWVWGhbf2bMvrFTZgMeUNipEGPeO3AW038XMk8 /1pGbbO/I8sjq93DaLhx1wU+7WntR6uxeajYZTPPu1hX0/3t1I5QmuI+Yfy4eUyAHlUeJtmHzdq p0hB+q9ZQSuUDaYZNgffnmRdYxEoegpoRWKiufT26n1kHbEMIcuWkFQzOx5Nr88/toluCDDruOr wBQZki6AC3izA/Eg9uUBxYS/ng0GTyPFqcyvAiiPLoaGWcZafZ1vz3aDKgkAHOzKa5Nc/NTZiev hlW+Fnl5E2ijVccIw2J9ixrY/VQNzA8312wB3pFOvWXdeQfVEj89WDOhpww08NOr8V71eIYmruA UFdPIE44NjCwDPeDedR0JQjr4pFqmugWzb1dlDTfJ86NY2b36cMapo3tCnGTB4FEvAIzDnEQORs dm0FkWnXOyP2yzb8cnjE1S1Q== X-Received: by 2002:a17:902:d54f:b0:2b7:a350:463f with SMTP id d9443c01a7336-2c718dd8598mr24155975ad.10.1781844098519; Thu, 18 Jun 2026 21:41:38 -0700 (PDT) Received: from pve-server.rlab ([49.205.216.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c7208e5760sm8293735ad.36.2026.06.18.21.41.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2026 21:41:37 -0700 (PDT) From: "Ritesh Harjani (IBM)" To: linux-mm@kvack.org Cc: Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Barry Song , Youngjun Park , David Hildenbrand , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Sayali Patil , "Ritesh Harjani (IBM)" Subject: [PATCH v4 3/3] powerpc: Kconfig: Enable THP_SWAP on Book3S64 Date: Fri, 19 Jun 2026 10:10:59 +0530 Message-Id: X-Mailer: git-send-email 2.39.5 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit THP_SWAP avoids splitting of a transparent huge folio into 32 smaller 64K folios (Radix-64K pagesize / 2M PMD) or into 256 smaller 64K folios (Hash-64K pagesize / 16M PMD), during swapout. This improves the swapping performance since all the bookking & I/O submission happens once per large folio. More details at [1]. PowerPC Book3S64 could not enable this before because PMD_ORDER is selected at runtime depending upon the chosen MMU. The earlier patches in this series turn SWAPFILE_CLUSTER into a runtime value and introduce an ARCH_MAX_PMD_ORDER upperbound override for SWAP_NR_ORDERS. With those changes, we can now enable THP SWAP for Book3S64. This increases bandwidth throughput with zram backend for swapout by 40-50% with Radix and 100-130% with Hash (Tested by Sayali) [1]: https://lore.kernel.org/all/20170515112522.32457-2-ying.huang@intel.com/ Tested-by: Sayali Patil Signed-off-by: Ritesh Harjani (IBM) --- arch/powerpc/platforms/Kconfig.cputype | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index bac02c83bb3e..48f74bd22343 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -113,6 +113,7 @@ config PPC_THP select HAVE_ARCH_TRANSPARENT_HUGEPAGE select HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE + select ARCH_WANTS_THP_SWAP if TRANSPARENT_HUGEPAGE choice prompt "CPU selection" -- 2.39.5