From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8791C433EF for ; Tue, 31 May 2022 02:32:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B6E06B0078; Mon, 30 May 2022 22:32:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3658F6B007B; Mon, 30 May 2022 22:32:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 228206B007D; Mon, 30 May 2022 22:32:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1391E6B0078 for ; Mon, 30 May 2022 22:32:16 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id D830D33EA9 for ; Tue, 31 May 2022 02:32:15 +0000 (UTC) X-FDA: 79524463830.01.FF327A0 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf13.hostedemail.com (Postfix) with ESMTP id 54A792005A for ; Tue, 31 May 2022 02:31:43 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 84CF423A; Mon, 30 May 2022 19:32:14 -0700 (PDT) Received: from [10.162.41.9] (unknown [10.162.41.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 03CB83F66F; Mon, 30 May 2022 19:32:08 -0700 (PDT) Message-ID: Date: Tue, 31 May 2022 08:02:06 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v2] arm64: enable THP_SWAP for arm64 Content-Language: en-US To: Barry Song <21cnbao@gmail.com> Cc: Andrew Morton , Catalin Marinas , Will Deacon , Linux-MM , LAK , LKML , =?UTF-8?B?5byg6K+X5piOKFNpbW9uIFpoYW5n?= =?UTF-8?Q?=29?= , =?UTF-8?B?6YOt5YGl?= , hanchuanhua , Barry Song , "Huang, Ying" , Minchan Kim , Johannes Weiner , Hugh Dickins , Andrea Arcangeli , Steven Price , Yang Shi References: <20220527100644.293717-1-21cnbao@gmail.com> From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 54A792005A X-Stat-Signature: w5u8oj7wz3i1xyd1rtaskd6b6z5jhhz4 X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf13.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com X-HE-Tag: 1653964303-436769 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 5/30/22 15:23, Barry Song wrote: > On Mon, May 30, 2022 at 7:07 PM Anshuman Khandual > wrote: >> >> Hello Barry, > > Hi Anshuman, > thanks! > >> >> On 5/27/22 15:36, Barry Song wrote: >>> From: Barry Song >>> >>> THP_SWAP has been proved to improve the swap throughput significantly >>> on x86_64 according to commit bd4c82c22c367e ("mm, THP, swap: delay >>> splitting THP after swapped out"). >> It will be useful to run similar experiments on arm64 platform to >> demonstrate tangible benefit, else we might be just enabling this >> feature just because x86 has it. Do you have some data points ? >> >>> As long as arm64 uses 4K page size, it is quite similar with x86_64 >>> by having 2MB PMD THP. So we are going to get similar improvement. >> >> This is an assumption without any data points (until now). Please >> do provide some results. > > Fair enough though I believe THP_SWP is arch-independent. Our testing > will post data. Plus, we do need it for real use cases with some possible > out-of-tree code for this moment. so this patch does not originate only > because x86 has it :-) I understand, but as you mentioned some data here will be helpful. > >> >>> For other page sizes such as 16KB and 64KB, PMD might be too large. >>> Negative side effects such as IO latency might be a problem. Thus, >>> we can only safely enable the counterpart of X86_64. >> >> Incorrect reasoning. Although sometimes it might be okay to enable >> a feature on platforms with possible assumptions about its benefits, >> but to claim 'similar improvement, safely, .. etc' while comparing >> against x86 4K page config without data points, is not very helpful. >> >>> A corner case is that MTE has an assumption that only base pages >>> can be swapped. We won't enable THP_SWP for ARM64 hardware with >>> MTE support until MTE is re-arched. >> >> re-arched ?? Did you imply that MTE is reworked to support THP ? > > I think at least MTE should be able to coexist with THP_SWP though > I am not quite sure if MTE can be re-worked to fully support THP. Understood but I just wanted the wording above in the commit message to be changed to literally anything other than 're-arched'.