Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp521913rwb; Thu, 6 Oct 2022 00:06:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4hLGiNP2z0EGsF1ChxHbYDe2RMVyk7NUvVKxunYkwVDpuIpubSHcI81yB/dEfBuCOW76Da X-Received: by 2002:a17:90a:d990:b0:20a:df07:66ba with SMTP id d16-20020a17090ad99000b0020adf0766bamr3920001pjv.12.1665039978434; Thu, 06 Oct 2022 00:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665039978; cv=none; d=google.com; s=arc-20160816; b=nqBnTsib+g1oC8QsO09jnHLDbnTdcR+VDWh4qYbbd111nYOh+Pd5ckUoTvb2lUNvoq o09HEZ+GPnG044oXqNq6em9NSbgQfbHto9tvPfIsAQe4a4ISPOMhDBy6sPyI+2S7Bm+w vkMeNSSl0g1KFkD2lJ6DcoPhVV+iGoEBLq6FAibEJTXxIGfyp2N9866TfoxWauG8XzPo zH2pGEKImdfZ+8cQzUaNYhslRrBTORPWF1R9a7DR2LLfSePIE2iY4wLJpK+DfbBFdIyl DCwn+lUhY0fKfykAYu7FZhrnlcPERZ/uyOHgGfFLU8kbUIVs70fDMVk5EWLrOAlSGWe7 O2QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nhoM2dBBInapDMTabtQ5D+Mns/mcoeqXKpy+d96f6D0=; b=ZSXKnrZeXs7miMR9t9ZjohvNkZyR7R23gguUbW1hq/Zg9fhaJovrOZAHV867500Z1c vI48CRpXRnsPBkPrXdQEBSCIMD3pmiyQWrLWFDKI6zP1xm6OmSYJshFYF6eAJ29vp0bZ pJPVWhQtw25OvUJZL1fbu1U0nLyfskABjsItSUclg61fCVR5K8MIcZ9fXvRDuN/44MAi S6WmVt5k0MzhkssREQTocfXS2dB62QPuQcntGJtbbhix1QpeJQGuszZOlGxs1Y59Gicr bXFepRxJT2sltv/cSsqh38ZGHiSBcad8EGvlgSJzLIS/5qd3HwmDgDF21DchK72/pxBn bHFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=wnX7oWxR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a631905000000b0044b528f9d8fsi12171086pgl.86.2022.10.06.00.06.01; Thu, 06 Oct 2022 00:06:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=wnX7oWxR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229610AbiJFGxf (ORCPT + 99 others); Thu, 6 Oct 2022 02:53:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbiJFGxc (ORCPT ); Thu, 6 Oct 2022 02:53:32 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B2F589800 for ; Wed, 5 Oct 2022 23:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1665039208; x=1696575208; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=TWTzXIepdJAhGXlLlYIHyFJRwqOy33J1R/GJHz29r8M=; b=wnX7oWxR02Bt6RlSWjORLEs2fhhFZHtt8gLMtSl4GexaqmSso2eHqS91 T7TN974AJmSTwKyZq2314nKEh6t33gCTGpNiODy78kQxEaMWBH6wzC9Y7 dmZYdh3n5+Psqx//2ZVChhebIfIW1naaz/d6UXQr+rXKHGPTMkCaBX1CB 8lBWpLkuNmBegEU1/HcxxDWPvzcFrO96KG6nBBGbRjtq67PVEe1K+W+N/ 6HZO4gaGiUgkbjJeURf9uitfS6bYuyiMhi6IVQ8Tb6k4TxpR6irQFbEnz kxb7Zy8eDRVeMgWXhqiMInrOBY/zMFDPKK9zaZcc/qUoMKX6oqWXEptDB w==; X-IronPort-AV: E=Sophos;i="5.95,163,1661842800"; d="scan'208";a="180642588" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 05 Oct 2022 23:53:27 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Wed, 5 Oct 2022 23:53:26 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12 via Frontend Transport; Wed, 5 Oct 2022 23:53:25 -0700 Date: Thu, 6 Oct 2022 07:53:03 +0100 From: Conor Dooley To: Palmer Dabbelt CC: , Paul Walmsley , , , Subject: Re: [PATCH] riscv: enable THP_SWAP for RV64 Message-ID: References: <20220821170559.840-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 05, 2022 at 07:35:53PM -0700, Palmer Dabbelt wrote: > On Sun, 21 Aug 2022 10:05:59 PDT (-0700), jszhang@kernel.org wrote: > > I have a Sipeed Lichee RV dock board which only has 512MB DDR, so > > memory optimizations such as swap on zram are helpful. As is seen > > in commit d0637c505f8a ("arm64: enable THP_SWAP for arm64") and > > commit bd4c82c22c367e ("mm, THP, swap: delay splitting THP after > > swapped out"), THP_SWAP can improve the swap throughput significantly. > > > > Enable THP_SWAP for RV64, testing the micro-benchmark which is > > introduced by commit d0637c505f8a ("arm64: enable THP_SWAP for arm64") > > shows below numbers on the Lichee RV dock board: > > > > thp swp throughput w/o patch: 66908 bytes/ms (mean of 10 tests) > > thp swp throughput w/ patch: 322638 bytes/ms (mean of 10 tests) > > > > Improved by 382%! > > > > Signed-off-by: Jisheng Zhang > > --- > > arch/riscv/Kconfig | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > > index ed66c31e4655..19088c750c7f 100644 > > --- a/arch/riscv/Kconfig > > +++ b/arch/riscv/Kconfig > > @@ -45,6 +45,7 @@ config RISCV > > select ARCH_WANT_FRAME_POINTERS > > select ARCH_WANT_GENERAL_HUGETLB > > select ARCH_WANT_HUGE_PMD_SHARE if 64BIT > > + select ARCH_WANTS_THP_SWAP if TRANSPARENT_HUGEPAGE > > select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU > > select BUILDTIME_TABLE_SORT if MMU > > select CLONE_BACKWARDS > > Thanks, this is on for-next. FYI, this is v1 of a patchset that went to v3. v3 only changed the commit message, but v2 had a functional change. v3 is here: https://lore.kernel.org/all/20220829145742.3139-1-jszhang@kernel.org/ Thanks, Conor.