Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp235444iog; Mon, 13 Jun 2022 01:13:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxM/UD6tRNz+BC3OoRYu4LGYr7YnaGNvQjIEDOsxrmkaVpsGEaU6IDo0OwQlFAOzRhEFExR X-Received: by 2002:a17:907:a064:b0:711:c819:3cbf with SMTP id ia4-20020a170907a06400b00711c8193cbfmr38390391ejc.460.1655107982618; Mon, 13 Jun 2022 01:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655107982; cv=none; d=google.com; s=arc-20160816; b=i6TnnqESTG+Bpl9XNvoBxby9xp9reb3W1vuvxwgGH2Xp01+8Zop2eUqDnY65yBgycs BMOwrJdGRiqbP43TZlHuVeawKNcmiJKX/nd7oxW9HN/RaUoRicHH2RrtgxSsVAQrqpsI 1sELNiug+iwi+oN5825z4wErl16N5pCk9e+iTMXU8bv0MQXhuZDidJhT087yABnMCGHl EAU58wnLK3kpGW4nPUswm3aJzYovqImmLPlYrPaGfLiAwAk+lP07n8NF08uzhJDV7f59 zpsMSmk6fAavRJDd5gRc7332Ccor53RqEWi9yyoejYiTFir7N1oHAW2jhGkn9xyr9g4v xO2A== 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:dkim-signature :dkim-signature; bh=y60ZvMkZEvWsM3Un0BjgZp3hCBuh4mCFqBODWskoeZE=; b=r5JWFnhMzIk0xN7I2/KSSuPENfhRjUy7JeDT+HJrrkIkNot3CxLf7QNx1HlNjVyTl4 LkbcTu7C2iilf4Y6guORlyDn6QsGpCHHsSup/RJPDnSnVcRrUgwVWbxpj8tKxPS3PQP7 aCjPRhW5GGXfZIixyMfvD8YivcJEWlESR3s279w4fLV8Us4tEZ7TMJxmSioy4F6Ykhj8 2yQAFUz4gz+SKP1bySaMW9jw6rE+VnAIQPSZPtrB490ZED0k15QpoMbGdJjzrhbJ+P1s fVuNQ+19mumM3xCiMy2v3iOblgodbeL2Y8b7MFwGGGJqxBpRFN+wMT9lFHze3MwPcdx1 M8Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=akD1NQrP; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=wVCJhQJL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eq20-20020a056402299400b0042de8197d09si6325702edb.537.2022.06.13.01.12.37; Mon, 13 Jun 2022 01:13: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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=akD1NQrP; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=wVCJhQJL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239488AbiFMIFK (ORCPT + 99 others); Mon, 13 Jun 2022 04:05:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239550AbiFMIEy (ORCPT ); Mon, 13 Jun 2022 04:04:54 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB5431E3C4; Mon, 13 Jun 2022 01:04:49 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 770591FAC3; Mon, 13 Jun 2022 08:04:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1655107488; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y60ZvMkZEvWsM3Un0BjgZp3hCBuh4mCFqBODWskoeZE=; b=akD1NQrPb8kShRnk5+EHe9Cr91LqOhi0QO71GuaEYHpEmW49+LoonALIapZr511qIZPLtq 5K/x6DMxM+ZVP6WWM+45emQFsHMbb9xPma3VpqdrtcjOfkUSAQDyXTF1Q+r3dsdJ1rkrQb xo2AJdWVATN3YMr+padQdfhNAuXYTJI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1655107488; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y60ZvMkZEvWsM3Un0BjgZp3hCBuh4mCFqBODWskoeZE=; b=wVCJhQJLX4rfg077cikqvO4E2WMFayaLWJVwyDa69Hq5geO6iYcXP8dsl3raNUwY8GAfMm Se+tuBPW96J9fFCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C19A613443; Mon, 13 Jun 2022 08:04:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WA+SLJ/vpmJeIAAAMHmgww (envelope-from ); Mon, 13 Jun 2022 08:04:47 +0000 Date: Mon, 13 Jun 2022 10:04:46 +0200 From: Oscar Salvador 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, Catalin Marinas , 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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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: Oscar Salvador -- Oscar Salvador SUSE Labs