Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp279424rwo; Fri, 21 Jul 2023 11:43:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlGrNMm11BN68ExK0lokUGMz3/eLjI/+pk+wkk7egvSFD8v0RLzXKamr84U8u90yRuVjal16 X-Received: by 2002:a17:906:31d8:b0:994:2fa9:7446 with SMTP id f24-20020a17090631d800b009942fa97446mr2062899ejf.46.1689965006287; Fri, 21 Jul 2023 11:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689965006; cv=none; d=google.com; s=arc-20160816; b=BQWmHQigZCkyrrNG/to6rMYGSRp2BxJ30ChEaAh8pCSPiFLwmVFqVrd+J3E/avx1eo UjNqEzdWz1EqhiVtjEqAQGnQBE41zFnWe5uxxnhap4uPauWmmMVM+qOlvWt/Rb/+zaMv wr3FVCkwPpSoFXYSlyIvrztE5f3/nJzrUmGAk42GobzqsTLZD5Kpu25VZsrgxRsttN5H vt6YTijQQQ3HxR2i8mAovoawxpXwxiC1VEWOZ5eiMZqe3NbLgAs3yLQ+WcV60GI68n0X tjKBdIh3Evddk9LBmFwpd/bRaFRX7MXE83E9NS7hbs0OUpBHh0mN1Uh9yIWHWrMQaqG4 nO2w== 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=/QWy6f+yTfSc+uIN2kQN90oVBGPsmVrqF7pDdEeptgY=; fh=H9K/73VJ59rOXystEcPTQ24eQHDroQNPBOEHC4F/oIo=; b=WA8L+lKA76cgjDU0HUwdoT1b8UM5Zq6bwPqsB8QguVe9jumHj50MUfhjU+ChSg325N RU7AbahFes+wnotS/nI9PZtaXkl4Sbio+DnjER2VGaaQgdfB495Z7g4zW6NHmWw/DrV2 dzX6XXXw3LQvH739cODcaSHlp46z2tPmXnhL4mQyk0HkdtMufpZaWw8npOzGWi9nkFfk hQ9ebcfyS3LoDKSp4aOf8lJ/TkEvh8d7Sw3zF4jlrM96ZgzVeajTbQaYMJ5kfOl5U62p b8GJBV+Z0E+zt0r+5/flTR+0VnyXDXwRjqPYt25SVIEQliXa8DtiTBPs8FUW/DQ1EUY0 QQOA== 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 rl19-20020a170907217300b00993b3881ed2si2378725ejb.686.2023.07.21.11.43.00; Fri, 21 Jul 2023 11:43:26 -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 S230370AbjGUSYM (ORCPT + 99 others); Fri, 21 Jul 2023 14:24:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbjGUSYL (ORCPT ); Fri, 21 Jul 2023 14:24:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 112D73A8C; Fri, 21 Jul 2023 11:23:57 -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 65EDA61D7E; Fri, 21 Jul 2023 18:23:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41432C433C9; Fri, 21 Jul 2023 18:23:50 +0000 (UTC) Date: Fri, 21 Jul 2023 11:23:49 -0700 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, Anshuman Khandual , Barry Song Subject: Re: [PATCH v11 1/4] mm/tlbbatch: Introduce arch_tlbbatch_should_defer() Message-ID: References: <20230717131004.12662-1-yangyicong@huawei.com> <20230717131004.12662-2-yangyicong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230717131004.12662-2-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:01PM +0800, Yicong Yang wrote: > From: Anshuman Khandual > > The entire scheme of deferred TLB flush in reclaim path rests on the > fact that the cost to refill TLB entries is less than flushing out > individual entries by sending IPI to remote CPUs. But architecture > can have different ways to evaluate that. Hence apart from checking > TTU_BATCH_FLUSH in the TTU flags, rest of the decision should be > architecture specific. > > Signed-off-by: Anshuman Khandual > [https://lore.kernel.org/linuxppc-dev/20171101101735.2318-2-khandual@linux.vnet.ibm.com/] > Signed-off-by: Yicong Yang > [Rebase and fix incorrect return value type] > Reviewed-by: Kefeng Wang > Reviewed-by: Anshuman Khandual > Reviewed-by: Barry Song > Reviewed-by: Xin Hao > Tested-by: Punit Agrawal Reviewed-by: Catalin Marinas