From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (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 3CD2F21A92F for ; Tue, 23 Jun 2026 09:07:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782205657; cv=none; b=Hmn5kdMZf16vVcFdclM6CUgPzCcRX6ej0VZLRnZEhbjFvOyDZPbZeDSVupxPKuVupHpJ1LyrgETeU/2TdZovqGg98/fA0OZlmEmvuVkHfd7+cw5jo0lhlhH5VH1SwGK+fcpbJQLczchdOfmYwJtK+vmQcn/xJ/nVg0f3zPee+Wg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782205657; c=relaxed/simple; bh=6spHrHgBqIXLs3oShth/eK080eFpchGrRDS7859a1QY=; h=From:To:Cc:Subject:In-Reply-To:Date:Message-ID:References: MIME-version:Content-type; b=CR3h+7bZzaZVg119cMYUDRSgPRONgwSAsuElOi0m6y9qOImEf/g+BJdGJqFFFrnG1pJNm52bFFmrrEDrf20mB4Dh75xqriH8tZHqxWYo2aq8g9PyBhIFV11oSWdmIluxUOymdEp1iIEUSJJNx7vPS1O0Jd3D9bYqEtb3DDveqH4= 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=ieZ+y6zR; arc=none smtp.client-ip=209.85.216.52 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="ieZ+y6zR" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-37d82f3a244so1193083a91.2 for ; Tue, 23 Jun 2026 02:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782205655; x=1782810455; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:message-id:date :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6spHrHgBqIXLs3oShth/eK080eFpchGrRDS7859a1QY=; b=ieZ+y6zRhF4guQR0A5oAY2XMMf2L0hbOqtSvaS2IgGwNPJUoWIw8wCyF7GLYGsBhBb Aa96Eve5142PC8rFxCX9811PumWVs9n+wbVDRICmLX00PVFz6Kkkshi9j0BfVCAih5E8 7SNtd3LY1dNa43IEU5KYBumkbZifCT00d4KMdOKAHbxY2OL9Nz1RN4XUmNSklEMaGsL5 bkJzaxw5I7lHCrgyxrztsEQKIEQdARHT4LeF3hzauVMOfzASfi3zDavAkZ4ASCn/5vFY 8N2Lju4fFLH+0GgBNP3Dkudxx0AYnrLsKEP9AW3yVn8kK2yYFiuY2sQFBSFZMG0c2yE2 y2LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782205655; x=1782810455; h=content-transfer-encoding:mime-version:references:message-id:date :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=6spHrHgBqIXLs3oShth/eK080eFpchGrRDS7859a1QY=; b=kP/XNnerMvgUWUTg4bLjZ+XFdYOOFUu27PFU/sDHaJWv3cOVj7ystl+LHA1JVEdD/A IlneYLLWLlJiGrWb3AKyBsAZKSBLkaBYiFhbiWlGjGUu7Gh8pSr2m9Crdk8MQHaKnIpu hLnfDcXt0TbD5jf/ALzpY355Wqxelse8Yu8icCT1nZlDLU5Og2lajDdUU3QhZ8QTzF7V 1hRHsMBh60AoJbtfVDYbaSX03QgX6vess2B4RuXcZ6JCSQ5vyDSwIJCUiSchtH6tqE4T NdXMy69HPRb3E4Bke5yVV6kSmYEho8ksV+3BKmgAv3KbXoLXGVhP0NmC93cxS9UhJkJQ 9CWg== X-Forwarded-Encrypted: i=1; AHgh+RpgpyN/jCKILf1gjo/wzVP4QBziuwpXDGowf/9+HbLspvhNmIsiSz/DPGs1xNtUmwJ6gn0GLFS/4En3h6E=@vger.kernel.org X-Gm-Message-State: AOJu0YyUydvUkVpnlHyKJXsMrcW9JdIepEnEwxWtS3GqQGhJjnksmMm8 +YdBtIZjb23T5AK5Vjz7V4NrSmjBE29MX0kT2uee9zvIPF22JQpZi+jl X-Gm-Gg: AfdE7cnAjmpMxE5B8rGGPoBkj54MhedUaB6ldXmNzrhA64SlxFB1w6w7x/qFXprWUiO qO/F/Tx2wOhN0UdzzAPL+XKvFJZlMUoM7DZBj/bnO5PPLDzxApIqfkZEvYAnI2+Cz3vraTeX+fi sFrt5y9K6Z+G9aHRp1F3+5hLzTCOgRvsf6sLi41lhw3wUovqW1ENLMZufsBq+Rvt0IlQfJ6ctUw o6v4Tl0VIqcdwareRCevjLfJB9T2eMs981d0py/ljK4uPxnU5pM1CX+bbFZ0IEleeTSjWGg29BD jjHt/sEY/r2nw1okcXP3hkNUAOPFi7BWctKQtClmlaDmRJkHxwm6nCaA+qkNmXVa2jFsOnLm2D7 lweLR6YU3xJADSQrw3lrk5Dmun5zcr+ZxGRZAXDYDdzVwM8Z1Bhq76H8boFS3D7EXW4zwrmK/9F tef0yAWY2NmDrI3UtoElH6nFB8gQ== X-Received: by 2002:a17:90b:43:b0:369:7433:2fe with SMTP id 98e67ed59e1d1-37d4d834636mr13010957a91.6.1782205655379; Tue, 23 Jun 2026 02:07:35 -0700 (PDT) Received: from pve-server ([49.205.216.49]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-37d15df7424sm12256623a91.14.2026.06.23.02.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2026 02:07:34 -0700 (PDT) From: Ritesh Harjani (IBM) To: Barry Song Cc: linux-mm@kvack.org, Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Youngjun Park , David Hildenbrand , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Sayali Patil Subject: Re: [PATCH v4 3/3] powerpc: Kconfig: Enable THP_SWAP on Book3S64 In-Reply-To: Date: Tue, 23 Jun 2026 14:33:54 +0530 Message-ID: References: <1pdxybv5.ritesh.list@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Barry Song writes: > On Tue, Jun 23, 2026 at 3:12 PM Ritesh Harjani wrote: >> >> Barry Song writes: >> >> > On Fri, Jun 19, 2026 at 12:41 PM Ritesh Harjani (IBM) >> > wrote: >> >> >> >> 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) >> > >> > Thanks! >> > >> > I am curious about the contents of the anonymous memory being tested >> > and the compression algorithm used by zram. >> > >> >> I am sure it was derived from your microbenchmark itself which you had >> shared here (so repetitive pattern) with default zram compression >> algorithm. Thanks for that :) >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0637c505f >> >> I think I got your point - I can mention that it was a microbenchmark >> similar to yours and not a real world workload test. Is this what you >> meant here? > > Yep. Please make it clear in the changelog what kind of workload was > used, as different data can result in completely different compression > ratios and compression/decompression costs. Consequently, the reported > swap-out and swap-in performance improvements can vary significantly as > well. > Sure, I will update the changelog in the next version with more details on the benchmark ran. Mainly planning to provide the link to your commit for the e.g. microbenchmark code we ran along with few other details. > w/ that, please feel free to add: > > Reviewed-by: Barry Song Thanks Barry for the review. -ritesh