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 C53C0C433EF for ; Tue, 28 Jun 2022 05:47:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 23D618E0002; Tue, 28 Jun 2022 01:47:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1EC0B8E0001; Tue, 28 Jun 2022 01:47:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B5F68E0002; Tue, 28 Jun 2022 01:47:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id EE96D8E0001 for ; Tue, 28 Jun 2022 01:47:38 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id BBD8F6120B for ; Tue, 28 Jun 2022 05:47:38 +0000 (UTC) X-FDA: 79626562596.04.E54AD49 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf21.hostedemail.com (Postfix) with ESMTP id 1944B1C0028 for ; Tue, 28 Jun 2022 05:47:37 +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 556C8152B; Mon, 27 Jun 2022 22:47:37 -0700 (PDT) Received: from [10.162.42.7] (unknown [10.162.42.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5DB383F5A1; Mon, 27 Jun 2022 22:47:34 -0700 (PDT) Message-ID: <397f73f7-14d6-ee0c-af42-39e193df030c@arm.com> Date: Tue, 28 Jun 2022 11:17:32 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] mm: hugetlb: kill set_huge_swap_pte_at() Content-Language: en-US To: Matthew Wilcox Cc: Qi Zheng , mike.kravetz@oracle.com, songmuchun@bytedance.com, akpm@linux-foundation.org, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20220626145717.53572-1-zhengqi.arch@bytedance.com> <037fc8c3-9b71-cb83-8882-95d5459a494f@bytedance.com> <8b4eba5d-545e-c2a4-e4cf-fd5dd6634265@arm.com> From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656395258; a=rsa-sha256; cv=none; b=WkzNRMai2VHw24sJ6XjBv58Xgad5iQoK0wPwxBjMUquPl+Rdsm3ryTt6gU9mFYH/B2Y4Ad 8vJ7nMFaRvbgXNgeRXznNmy0sTrgq7iVhxIhZPCIPV+U7BIzjNMX+Q/QYIWYQUB+7lbuv/ Svv5jw4nwry6wmpdZJFBBkYhQFAd3Gs= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; spf=pass (imf21.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656395258; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OLBdI1zkzvbQipvYcVTfZU1Mydhqn0rHe3K7TbfSxjo=; b=DwGAqecbrFCr7x+axop9crmxNTeQXcrmgDY8u2exl96MMkj0iRtK4iWOeQe5/mxz+hkF2V vhCfSt/wyX+6R4PgvPsIDDFsirv0dLMCOvgetSE4IwGlzd3t49HArB1yTukEd7l3XAyNY7 y7tDT8nxSgaM3R4SVxZZI0MKx4x0t30= X-Rspam-User: Authentication-Results: imf21.hostedemail.com; dkim=none; spf=pass (imf21.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com X-Rspamd-Server: rspam02 X-Stat-Signature: u19sug6mk576rpnoirwgorjphu5rm9p7 X-Rspamd-Queue-Id: 1944B1C0028 X-HE-Tag: 1656395257-518324 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 6/27/22 20:04, Matthew Wilcox wrote: > On Mon, Jun 27, 2022 at 01:05:00PM +0530, Anshuman Khandual wrote: >>> For the swap entry of hugetlb, we need to remember that we should >>> call set_huge_swap_pte_at() instead of set_huge_pte_at() every >> >> Which is intuitive, so what is the problem ? > > The problem is that HugeTLB is DIFFERENT from the rest of the VM. Agreed. > This has a huge cost in programmer time, which is infinitely more > valuable than the cycle shaving you're quibbling over. We should take > any and every opportunity to make huge pages work the same way as THP > and order-0 pages. Got it.