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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AD03C43334 for ; Tue, 28 Jun 2022 05:48:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245190AbiF1FsJ (ORCPT ); Tue, 28 Jun 2022 01:48:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245182AbiF1FsG (ORCPT ); Tue, 28 Jun 2022 01:48:06 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AAD6027148 for ; Mon, 27 Jun 2022 22:47:37 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.