From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 CE0CA32B13A for ; Fri, 12 Jun 2026 18:09:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781287795; cv=none; b=P58S7gW/h05g1s/bKFoF2lPTQibhBBFhT4vJvcBmstEHnWBiqBLnNjjYJYUTHtSD9poUrzdkiruzDRv/6e+RhzCJE7stHfk8z2R6ciiZ0XHwqwFmG6r1qYQ7q42WxIDk7taV3noYXXw1LBoP5aRkyZi9+VOdXy7aSBZAzlwVf7A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781287795; c=relaxed/simple; bh=m5MLokpP1cOVz0YPS40Nl3vuH3Utd6h++yjFqZU0zAg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZoJMbr0SkvnPal525w7kSBx5sptoV/srGJBZLzKrvGU2AR99iaee4AJ+80TDlPNK4UpGTnkjzoKHXIFKSjZ3/+XLg68nrH+FmBBXU8mAC/wJ+Ga/wkTD33UUw5Pb3NX8z/jaBzVDVN5V3bg+DUbe6CNBNvwuF7xd9wDRI1xlIq0= 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=nMas5UgZ; arc=none smtp.client-ip=209.85.214.180 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="nMas5UgZ" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2bf1cda2b17so10489395ad.1 for ; Fri, 12 Jun 2026 11:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781287794; x=1781892594; 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=nMas5UgZ3ilae/9du02KszpNMOgVH0nWEhzXaZO7y6gknEat+qBB2EPG/sEQUDO+of U5yUEluzi5t606GGL+h+SF9bovjaJolim1erWaZvHj4sS/81kI/y4ktoqb+Fh50ZjncR MwilisRfwbsNPgI5ZiEwsH3IhmyPeK3sGR6LeuQSb0XsRpRqLaFd074InUQCdys0gaX9 4NR9eiWJHdkBdilCu5Q5bGQovh9rnXHeWh53WQEYzcuTZLOmPr8ggxFyPcLFGCc+G1lE NB+sj+EruFtsokFUSvRv8dfGvWYqQ5wYodZTfpOSVY1rkxbPAGBymMuaBTGm6xDZaQl5 HEAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781287794; x=1781892594; 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=qQNQBuwAsUjnx+l+hQyzvwGu/Y6Ag9sKTQ20VlNaagldXDJoX6c7X4kJZKB0htab5v 2tO7YeayG5AVYyxRdYzp3HGZTy0glQYx3LY3grsMviq6piP/hDGGEMhnMC/0xg6l6OR1 FO3W4qH5JYlC35wZ3ysxUw2RxkR2gEOCtqbF9pyjhU3kRqBong7L7fUEVq99XK1Mf4EH KfXyZE5ZB9mwITeHKRnpY5BvBp7qv0x/32B3NWC5ZF7TnqzgsqYZq/bXOIgX1ej54JcB 3mxb0BORNbbHzmbsqFkmXIxdPfrTuH855hUBTm3tSp5Zr8ugsE9yJmucgxMUrl720txc iBuA== X-Forwarded-Encrypted: i=1; AFNElJ9LaA13leuKw4IY4m6AWtb0ORg6vsgbGW/c3BhyEp6NEilkYYjhhmJtnxyIDyxBA3yp9TJZllqFhwCXC4w=@vger.kernel.org X-Gm-Message-State: AOJu0YxSLaUIzv7yOuwLUc5A1tHRhxEBEVgPvb0+yCQvN05oUJ8HaQT0 1rJVaeiN+Izn7l5nR5XspkyWUEdfHTPyGNf1eZjjWo00edpdaOUwKG41 X-Gm-Gg: Acq92OEZYEJWTvhfOA1Zq2wasREUckPyZJkHaljxZauKbji21ga6CeyQBUkxjL/gWp8 KJYfRMUdFdlY8ksN+8hOqG4liIHKvbksIieouhnZItVRn/sPGEur1RWVDbzua3RnygTwC2Fx4b/ kqns5nKacAdWuQO4FEytvkYOR3fhQ2QMiTneicVExKcoO4/Zdo+rT1mBfnEpvLrki3+UcgPa5XA W8YkGnDUlRFcTpevSNgFyNkgwFq/Zkhs9wCI4zm5OfEIeYf1sDkavzQGTGSL8tVsQzJIhymzCzr T8P0M51/aYNPImNS288fWcdqbxJiI1jFh2PN3f6f+7q1sudtIHD3o+e6IQWYDnlChBYKGYzYx+K UEuz+hNpvKddOn11XbW5CTQwsAfvR0o3MeYJxkWW0CayC2e0nXDWzJ8nbk/LwB0A18V5f9gbpU9 QluBtEJyB9Axwa6xF8sYbsLKZcPfd9vaxL X-Received: by 2002:a17:903:b8f:b0:2c0:c262:b924 with SMTP id d9443c01a7336-2c42e834bd0mr32424725ad.13.1781287794124; Fri, 12 Jun 2026 11:09:54 -0700 (PDT) Received: from pve-server.rlab ([49.205.216.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c42f7c70easm38956975ad.25.2026.06.12.11.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2026 11:09:53 -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 v3 3/3] powerpc: Kconfig: Enable THP_SWAP on Book3S64 Date: Fri, 12 Jun 2026 23:39:17 +0530 Message-Id: <4c2b2590251be875cac2acea434a60e1c0f5c343.1781287298.git.ritesh.list@gmail.com> 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