Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3666641iog; Mon, 27 Jun 2022 23:28:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ty6kd2WhdL+9uR9EMebIoPTYstLJeDhb+o3qsXA7rJ3nFibG8xtpus89Mzkp9NY0CO2SDv X-Received: by 2002:a17:907:6e01:b0:726:9a7b:59b7 with SMTP id sd1-20020a1709076e0100b007269a7b59b7mr10983164ejc.752.1656397682322; Mon, 27 Jun 2022 23:28:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656397682; cv=none; d=google.com; s=arc-20160816; b=hdYyYYa2J9lCmdNXjO8xVUWhnkQzsmKX4hzNrxOGZQdmoVjGwokJ/2l7bJkfN4JxZW ygujUrJhAwyPEX3DsdBI902axdOR/rY6YmmBloWlzu8HNPVIH/ugqX/k/4CbpONB+sTh OwR4lckfQJpC6frI0MeKfINRqV+DZ5/fNVTNynU4bmMX/28Nl0JRt8fYmNa7H+DfCReu LTsWaRPFjGwMc/EOlwUcizEAT4UKqHtJJlFT0E1dGxrkvKRhG/g/51DQC9LzT4/HO0Z2 y4viBwBcU8CJyEJxC1nWmeYMdvOuo46Zsgo6Hr87zg0YyCwOvo3lcjGOMrxgbhxfBURl uOhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=OLBdI1zkzvbQipvYcVTfZU1Mydhqn0rHe3K7TbfSxjo=; b=m6mQaNDYY/s9P1QY0yt/n/g5/qndJBK2hiF4F0qc9RVeRuBxcTs3QE2GJLQubx8PFL p9WgBCglrABc0qtRoFZBquA+WT+WZaxYtWD31Xb6AIzx39sYXlQMZw9mela7zQsQ6+PQ Pz3Poz1qSqPJuNfvYgyLV+VjQKvylnA/CRy8w2gTLMWLZUmPVgnZTrSGmRv2EFXL38ON G9FTluahUM4mafidUu9pdyOtjyFKjaJAsLveLmgCWjv1srMDBHIA4K+oitnpjgoFWXuy OUbtRp6a6tbJDBzRdK5iXQcXZpbEjXZy1IZEshaGhVA+qY+BU4TxzIuMskfGm/kek2dL Ir6w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji2-20020a170907980200b00718c1dc9107si14115731ejc.159.2022.06.27.23.27.36; Mon, 27 Jun 2022 23:28:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245187AbiF1FsJ (ORCPT + 99 others); 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 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 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.