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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 499B6C4332F for ; Wed, 16 Nov 2022 01:51:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C07466B0071; Tue, 15 Nov 2022 20:51:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B90176B0072; Tue, 15 Nov 2022 20:51:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A58A66B0073; Tue, 15 Nov 2022 20:51:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 95D066B0071 for ; Tue, 15 Nov 2022 20:51:07 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 7462812023A for ; Wed, 16 Nov 2022 01:51:07 +0000 (UTC) X-FDA: 80137627374.06.A4E1687 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf08.hostedemail.com (Postfix) with ESMTP id A9169160006 for ; Wed, 16 Nov 2022 01:51:05 +0000 (UTC) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4NBmGP6h74z15Mgc; Wed, 16 Nov 2022 09:50:37 +0800 (CST) Received: from [10.67.102.169] (10.67.102.169) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 16 Nov 2022 09:50:58 +0800 CC: , Andrew Morton , Linux-MM , "linux-arm-kernel@lists.infradead.org" , X86 ML , Catalin Marinas , Will Deacon , Anshuman Khandual , "linux-doc@vger.kernel.org" , Jonathan Corbet , Peter Zijlstra , Arnd Bergmann , "punit.agrawal@bytedance.com" , kernel list , "darren@os.amperecomputing.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 , "linux-riscv@lists.infradead.org" , linux-s390 , Barry Song <21cnbao@gmail.com>, "wangkefeng.wang@huawei.com" , haoxin , "prime.zeng@hisilicon.com" , Barry Song , Mel Gorman Subject: Re: [PATCH v6 2/2] arm64: support batched/deferred tlb shootdown during page reclamation To: Nadav Amit References: <20221115031425.44640-1-yangyicong@huawei.com> <20221115031425.44640-3-yangyicong@huawei.com> <0D3A45FE-5367-40CD-A035-37F6EE98B25E@vmware.com> From: Yicong Yang Message-ID: <91e4804d-cb99-fd22-dafd-2f418f5c7ba9@huawei.com> Date: Wed, 16 Nov 2022 09:50:58 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <0D3A45FE-5367-40CD-A035-37F6EE98B25E@vmware.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.102.169] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668563466; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jbEhWfLuS8oCnFPLAAIit6yTP7qEpbcp+z2Eb4BlA0c=; b=LIOLWASmFraS4jiDc+ooVqG5hcn4wLEb3mxSrUv2YLsMnXbVhxAkqmf8nJMo7ug06R82GJ rELD1wQkJ4zOQo4fWMf1UllC5ohOpyx7Lq6RaCglaX+glYfHedjhDy+rt4tsvooqfhYtiX LGiVUcX1sWcOAFJ9P7lZ8iKLLPFDwQ0= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of yangyicong@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=yangyicong@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668563466; a=rsa-sha256; cv=none; b=caYNFlMuQj+7QSzbuV8df4WnpRu/BZCN2XBZ+vYgrIjFmWnAn1ou5s7JYysQeNhgAxRHG8 o7hUQrW8wd3UYmsbGh+KNboEUF3XVssNzH0gFD8cdE1FyWPAVii5yGOiJ4SnNfeOgBPZiW h3yJo89YCr3nx0XlBxCdK+PwWYPx82k= X-Rspam-User: X-Stat-Signature: u6f35cx8zeetqingi4oopoo7b1q41x1m X-Rspamd-Queue-Id: A9169160006 Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of yangyicong@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=yangyicong@huawei.com X-Rspamd-Server: rspam07 X-HE-Tag: 1668563465-763228 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2022/11/16 7:38, Nadav Amit wrote: > On Nov 14, 2022, at 7:14 PM, Yicong Yang wrote: > >> diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h >> index 8a497d902c16..5bd78ae55cd4 100644 >> --- a/arch/x86/include/asm/tlbflush.h >> +++ b/arch/x86/include/asm/tlbflush.h >> @@ -264,7 +264,8 @@ static inline u64 inc_mm_tlb_gen(struct mm_struct *mm) >> } >> >> static inline void arch_tlbbatch_add_mm(struct arch_tlbflush_unmap_batch *batch, >> - struct mm_struct *mm) >> + struct mm_struct *mm, >> + unsigned long uaddr) > > Logic-wise it looks fine. I notice the “v6", and it should not be blocking, > but I would note that the name "arch_tlbbatch_add_mm()” does not make much > sense once the function also takes an address. > ok the add_mm should still apply to x86 since the address is not used, but not for arm64. > It could’ve been something like arch_set_tlb_ubc_flush_pending() but that’s > too long. I’m not very good with naming, but the current name is not great. > What about arch_tlbbatch_add_pending()? Considering the x86 is pending the flush operation while arm64 is pending the sychronization operation, arch_tlbbatch_add_pending() should make sense to both. Thanks.