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 72E3EC04A94 for ; Wed, 2 Aug 2023 10:44:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231848AbjHBKoO (ORCPT ); Wed, 2 Aug 2023 06:44:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233750AbjHBKnq (ORCPT ); Wed, 2 Aug 2023 06:43:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1008944B1 for ; Wed, 2 Aug 2023 03:41:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9600F618FE for ; Wed, 2 Aug 2023 10:41:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACBB2C433C8; Wed, 2 Aug 2023 10:41:45 +0000 (UTC) Date: Wed, 2 Aug 2023 11:41:43 +0100 From: Catalin Marinas To: Kefeng Wang Cc: Andrew Morton , Will Deacon , Mike Kravetz , Muchun Song , Mina Almasry , kirill@shutemov.name, joel@joelfernandes.org, william.kucharski@oracle.com, kaleshsingh@google.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, 21cnbao@gmail.com Subject: Re: [PATCH v4] arm64: hugetlb: enable __HAVE_ARCH_FLUSH_HUGETLB_TLB_RANGE Message-ID: References: <20230801135616.165067-1-wangkefeng.wang@huawei.com> <20230802012731.62512-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230802012731.62512-1-wangkefeng.wang@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 02, 2023 at 09:27:31AM +0800, Kefeng Wang wrote: > It is better to use huge page size instead of PAGE_SIZE > for stride when flush hugepage, which reduces the loop > in __flush_tlb_range(). > > Let's support arch's flush_hugetlb_tlb_range(), which is > used in hugetlb_unshare_all_pmds(), move_hugetlb_page_tables() > and hugetlb_change_protection() for now. > > Note, for hugepages based on contiguous bit, it has to be > invalidated individually since the contiguous PTE bit is > just a hint, the hardware may or may not take it into account. > > Signed-off-by: Kefeng Wang Reviewed-by: Catalin Marinas