Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp286731rwo; Fri, 21 Jul 2023 11:51:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlHPs5Bn0+4mL86fI9+AvaPgPJfm0yB2vnTZadSKIwwEV3AgCXUVrWD4VXzZzxfFupQJmMkf X-Received: by 2002:a17:906:7396:b0:987:e23f:6d7a with SMTP id f22-20020a170906739600b00987e23f6d7amr2333844ejl.25.1689965496197; Fri, 21 Jul 2023 11:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689965496; cv=none; d=google.com; s=arc-20160816; b=yaSqMR1hc4GX5aeyiLBTI4IpLbqV2TlVCbRtZ5dq94+rpc0+qDMGc0gx/AD61c3Pfn tGRY72weger0ixrTVIkHnk3zx6KYIvO7CoGMjniTXYH+ffip106sly/lKsbrGr4edtGV WeteNIpMhp74mntp/cOV+3LzhmrmJ60WnJop1ujHG25RBI3tHtkHJW90C/8W3JYRgnZY iKWvcY0G1ym/acliGGwFAMQLAt6BcnEZUw7TedEpS3udN0+YsOypOT3JLxSY6sfvFNji aShw/xsV7N8sjOaBvW6m1V0eNIRP2ZE7/cInI2fVp7qDyxIiZrNX3ZqE4DaMKRPm0V+R NNmw== 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=CvHOvgSKWK4EkwujW18Y5YlZLbUg4CPtnjBb7caRWTI=; fh=SkDsdjyYg1CECWT5rU0od0iRpsRy3W2/h5jW7VdowQ4=; b=zD+dVlZVLyfgGUKFXsZ+n/lo6WR0xtdpZ5W+hzfRxRY1qCEjfnoXLx0K905OqrosJb 8oxY9f6OGz8KQTQ4c6KrYwZDv9Fcsu8g5wBim1MZ+J0H7Yo3rz3VS2fuT/SEkzfstpKA LNBtCksiXYVwyc8Jgdp2jI0WwCjAwt3AtqjlwGsEPQn1cXV/ZgDdW1cKMWw3+C/cYAUk zZk+YdbhX4hkQte8ScdcyJmcRhVqhMTVAYHFQdc5uKcreRye8HcXlOxiZoLyFr+I3Tc4 QFqaznp4vgpNXy08OTaofnfpK8h+yIGNmVV0THlGmV4G9PnoFwhxDkmwJef+LjAXgrra 6VFA== 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 f7-20020a170906494700b0095317ae767esi2394267ejt.46.2023.07.21.11.51.11; Fri, 21 Jul 2023 11:51:36 -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 S230326AbjGUSZB (ORCPT + 99 others); Fri, 21 Jul 2023 14:25:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbjGUSZA (ORCPT ); Fri, 21 Jul 2023 14:25:00 -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 554FE3A80; Fri, 21 Jul 2023 11:24:41 -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 DED6361D5F; Fri, 21 Jul 2023 18:24:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30C25C433C8; Fri, 21 Jul 2023 18:24:35 +0000 (UTC) Date: Fri, 21 Jul 2023 19:24:34 +0100 From: Catalin Marinas To: Yicong Yang Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, mark.rutland@arm.com, ryan.roberts@arm.com, will@kernel.org, anshuman.khandual@arm.com, linux-doc@vger.kernel.org, corbet@lwn.net, peterz@infradead.org, arnd@arndb.de, punit.agrawal@bytedance.com, linux-kernel@vger.kernel.org, darren@os.amperecomputing.com, yangyicong@hisilicon.com, huzhanyuan@oppo.com, lipeifeng@oppo.com, zhangshiming@oppo.com, guojian@oppo.com, realmz6@gmail.com, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, Barry Song <21cnbao@gmail.com>, wangkefeng.wang@huawei.com, xhao@linux.alibaba.com, prime.zeng@hisilicon.com, Jonathan.Cameron@huawei.com Subject: Re: [PATCH v11 3/4] mm/tlbbatch: Introduce arch_flush_tlb_batched_pending() Message-ID: References: <20230717131004.12662-1-yangyicong@huawei.com> <20230717131004.12662-4-yangyicong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230717131004.12662-4-yangyicong@huawei.com> X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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, Jul 17, 2023 at 09:10:03PM +0800, Yicong Yang wrote: > From: Yicong Yang > > Currently we'll flush the mm in flush_tlb_batched_pending() to > avoid race between reclaim unmaps pages by batched TLB flush > and mprotect/munmap/etc. Other architectures like arm64 may > only need a synchronization barrier(dsb) here rather than > a full mm flush. So add arch_flush_tlb_batched_pending() to > allow an arch-specific implementation here. This intends no > functional changes on x86 since still a full mm flush for > x86. > > Signed-off-by: Yicong Yang Reviewed-by: Catalin Marinas