Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp370652rwo; Fri, 21 Jul 2023 13:15:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlFIOB88MMh5pt5kyLiHyxGs/3CG6xjWNGr6ZXzWGPVJBBcXI2yIEf+HeKfR/56/aVLYYbrX X-Received: by 2002:a17:902:b708:b0:1bb:35b6:449c with SMTP id d8-20020a170902b70800b001bb35b6449cmr2292931pls.18.1689970520758; Fri, 21 Jul 2023 13:15:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689970520; cv=none; d=google.com; s=arc-20160816; b=MBhMYerfskP/NF1ln/6m+FE0r78dq1ZfdoglnmQRPbgucYHszgGjX6esFtiSC2dtex c/Y6gQkNzWd1X95Ww0ABC4fCCjD21IpK2DlL2iAgO2JUSviiW5udktmPmUA3yzR4NVOD oAV/4br7A4w3ulOxv7NfOvJ1fMmWdymbGPZEWWeRZBNRWALaBD6+rfmC6LtcpBv0Aa1z P7YKaV+uP32CmPk7D7aaZDxKHrHQIRagfKOBPwqxTqYkuL5+af+P5cnUbFOddZS6t/Jz 4r5e3JdF9WWCLoT9EFttcrNqdjiVOpU3LujlgklIBWyF0k5/P25xcYcJejafaujkGKwo qOqA== 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=u22j1tQJjYe2c+z4v5sEZIj1MZ/hC29GTHuxq2STV5s=; fh=p3gIyRhXTPYAw2ftDC0TPLmHC8aURM0UFqYsBdFsu9c=; b=Uh9CxEBFxPj6/r7vyC3zfQn0MGt2g3/VxKj4XiA2M41chG1fVN/KK1Rj9b1vAjfSYW pjdWEp6OyKf/wkID38guvWjsMfFf9zCPl5wqcTiW1QeiMpejRFghenV03aZtig9HLJkt loDw+BrCfI59BdwzLX58JsjOvJjcc7iIG5Z+T24DvmVqN4zPi8ZLooZhG0227zhGTMfL AsXo42S+dwQMXLLIOvz4NRCj+MrBTfO6jybMcM0Jb0ia6ZyAJ7Woiyxlfxul1MtlVEi9 Eqcw8GcsdZqwn3mwbcqYFgQRD9MOME67V/dkGFuPMTO4G7KM/yHxPwGZ66ynRJzlefOo W3Lg== 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 u12-20020a17090341cc00b001b89cda5e12si4127977ple.546.2023.07.21.13.15.08; Fri, 21 Jul 2023 13:15:20 -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 S230429AbjGUSZX (ORCPT + 99 others); Fri, 21 Jul 2023 14:25:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbjGUSZW (ORCPT ); Fri, 21 Jul 2023 14:25:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEC4635B8; Fri, 21 Jul 2023 11:25:13 -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 6779761D7D; Fri, 21 Jul 2023 18:25:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D11E2C433C8; Fri, 21 Jul 2023 18:25:06 +0000 (UTC) Date: Fri, 21 Jul 2023 19:25:05 +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, Barry Song , Nadav Amit , Mel Gorman Subject: Re: [PATCH v11 4/4] arm64: support batched/deferred tlb shootdown during page reclamation/migration Message-ID: References: <20230717131004.12662-1-yangyicong@huawei.com> <20230717131004.12662-5-yangyicong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230717131004.12662-5-yangyicong@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 Mon, Jul 17, 2023 at 09:10:04PM +0800, Yicong Yang wrote: > +static inline void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *batch, > + struct mm_struct *mm, > + unsigned long uaddr) > +{ > + __flush_tlb_page_nosync(mm, uaddr); > +} > + > +static inline void arch_flush_tlb_batched_pending(struct mm_struct *mm) > +{ > + dsb(ish); > +} > + > +static inline void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch) > +{ > + dsb(ish); > +} Nitpick: as an additional patch, I'd add some comment for these two functions that the TLBI has already been issued and only a DSB is needed to synchronise its effect on the other CPUs. Reviewed-by: Catalin Marinas