Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp792735rwo; Wed, 2 Aug 2023 04:25:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlGGziOqT2IjJQ7d0e7q3qHBC26L0i/mziMQm6AIN6aJ8MUQ/dLEFdci/RvJQx2Y1PAJh7El X-Received: by 2002:a17:906:76c4:b0:99c:524d:5052 with SMTP id q4-20020a17090676c400b0099c524d5052mr158506ejn.0.1690975552281; Wed, 02 Aug 2023 04:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690975552; cv=none; d=google.com; s=arc-20160816; b=ag+IUI+wwpeVJrBIBgs1vDbKJ3Ar6vFCllmjRi/MJQgI1Sl/nhdRHjS35kn0RPljjm NtcLsEZzdUc5BFlCeYqfR4d37YEF471PnDWpM7GQ9e23TjyA2DRBTcigdGV3CKjRoXR4 BlhdXjLqPsGVS0SUOO7XnIHLbHZpzpFJC/ZegwsCpvhOXurr5uJdnKgHC3eSSrIt+c8X stOmylGLguuskEZ+WkXTVxV66v2awZ+NxwKXv7tZJJSPRlgdvHxhlNm9ezblToNelDn8 Zw4mqmipfjfDdhrK283J80UXxZYYRacx3TCVPh6mRi9n6hdNx2mc49nC9LjbMlY1G6UH zvQQ== 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=1GX3YJB2KpLt20flOmKB/nqDnUDXZT50mkcEZHMuymc=; fh=RSXLHFGyAGSkmEn+CDvNTunViWhVqIGqePrrYPEAYD8=; b=o8wkO4/hGGgOdSyZonHQcVtYG6jK5ij+XfbQBfv0/Wd+vtQrBpEsWv8XHSxObawC7N m7ObvYv3u0617GlTgwTk7wXoySttWntnuf684xKH6t1GT9bNiDcBbP3tALoXgqziLQJB cQFEhEeD95pzDV9ocqgoJ3BluIAH5K21PntqOx0XrnY90KN2AoQ06Z0kEhrzLDKWR2NF lvj3pFzTE14tf3aZq+CVOMQKrg/9FH7ukre5ZC+jrjeMWg2T3tr3M0OCZvGm0Re+AQ1k V15CRJ/asf1Jd5dtd0iQL5vxm1kzn2kTfaSjO1dU6qBssV6sOK7pUfuNuWwDlMSY9818 5CQw== 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 f5-20020a1709064dc500b00992c195ac80si8138435ejw.357.2023.08.02.04.25.19; Wed, 02 Aug 2023 04:25:52 -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 S233350AbjHBKoK (ORCPT + 99 others); Wed, 2 Aug 2023 06:44:10 -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> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 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