Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3049438iog; Mon, 20 Jun 2022 10:04:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1th/wZCU58deUUEkvnlbQOyo9C9WlhaZxVB72gI66ZU+pxvEUybFt9QUS1Cmkmda/gDyryf X-Received: by 2002:a17:907:868f:b0:702:f865:55de with SMTP id qa15-20020a170907868f00b00702f86555demr22392901ejc.24.1655744699766; Mon, 20 Jun 2022 10:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655744699; cv=none; d=google.com; s=arc-20160816; b=QiUMblQAjUxpGnHZVvnZUwnY+dtpNGc/nur4ME95RxMz2D5T1YSr6ZG6B51NCf/o2o zyXZfBCOzaFzDDXtB36omybnMg0NlsubCQdnJNddZcsKeP52IiNgUDZmRoVdHIbqYYf0 4Xy7LM8OqwnIZL6ffLNjjOUK2b0E6LzsOPgVCM2zWw7eOvmIUWpzyUiB3wheyzIP4D9R pNXQwWSM10mk1kkfg4iUl737WNma04YlFO3Vj5tLeKo5SLRTkcHtJiUkif7TOkd3yRxx 0ewyacctYpzwxABLKECrdHM4UBj/B6P//iFeTcAhtpHS1/VcAfOutvAl3bu+mokfuJfR tCqw== 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; bh=EcgwD++hL/WPcHI5Z7WrMorXO3+Voyemu9/E6lv92DM=; b=nOVMtQuQ1fjl6hYKT1GrWkk/lZto5anGI8XpkuRSFon0rGOsqmfJbby0wgoEcxzZJQ SHTeXK7O4SAMj71JwXTbuHcePAzXFyvg6Rk0wrN+/pLWSL3cM+iGOKHtP3o/Isc6dVCE rdSpE7X0IBTjP2jEyjXQ9+yi4Ix72qKG0kPUFTnvV7nEFXUudEgX9hP2NNobsUNiACGf ELGvr/Hz1BbICcVsuKOs/lq8+FFtFDB5icZ0DRkqzj5a9Io88DcDuVdv/QtmYkI4MY1A 7zDtzlpSrKmmZJT63FQH7oRNFRSsC56NpwXLniEurwYViGKKeL0C5UUjDVVUh4e3G9Yq hYPw== 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 ht21-20020a170907609500b006feb04902a8si12754642ejc.824.2022.06.20.10.04.18; Mon, 20 Jun 2022 10:04:59 -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 S238812AbiFTQ51 (ORCPT + 99 others); Mon, 20 Jun 2022 12:57:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231153AbiFTQ50 (ORCPT ); Mon, 20 Jun 2022 12:57:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 843DC19FA9; Mon, 20 Jun 2022 09:57:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 49AC8B8120F; Mon, 20 Jun 2022 16:57:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28337C3411B; Mon, 20 Jun 2022 16:57:20 +0000 (UTC) Date: Mon, 20 Jun 2022 17:57:17 +0100 From: Catalin Marinas To: Muchun Song Cc: mike.kravetz@oracle.com, david@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Will Deacon , Anshuman Khandual Subject: Re: [PATCH 1/6] mm: hugetlb_vmemmap: delete hugetlb_optimize_vmemmap_enabled() Message-ID: References: <20220613063512.17540-1-songmuchun@bytedance.com> <20220613063512.17540-2-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220613063512.17540-2-songmuchun@bytedance.com> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, 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 Mon, Jun 13, 2022 at 02:35:07PM +0800, Muchun Song wrote: > The name hugetlb_optimize_vmemmap_enabled() a bit confusing as it tests > two conditions (enabled and pages in use). Instead of coming up to > an appropriate name, we could just delete it. There is already a > discussion about deleting it in thread [1]. > > There is only one user of hugetlb_optimize_vmemmap_enabled() outside of > hugetlb_vmemmap, that is flush_dcache_page() in arch/arm64/mm/flush.c. > However, it does not need to call hugetlb_optimize_vmemmap_enabled() > in flush_dcache_page() since HugeTLB pages are always fully mapped and > only head page will be set PG_dcache_clean meaning only head page's flag > may need to be cleared (see commit cf5a501d985b). So it is easy to > remove hugetlb_optimize_vmemmap_enabled(). > > Link: https://lore.kernel.org/all/c77c61c8-8a5a-87e8-db89-d04d8aaab4cc@oracle.com/ [1] > Signed-off-by: Muchun Song > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Anshuman Khandual Reviewed-by: Catalin Marinas