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 7BA41EB64DA for ; Wed, 12 Jul 2023 15:18:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 19C676B0072; Wed, 12 Jul 2023 11:18:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 172256B0075; Wed, 12 Jul 2023 11:18:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0882F6B0078; Wed, 12 Jul 2023 11:18:10 -0400 (EDT) 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 EECFF6B0072 for ; Wed, 12 Jul 2023 11:18:09 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 96B29C02EA for ; Wed, 12 Jul 2023 15:18:09 +0000 (UTC) X-FDA: 81003315498.22.872ED3B Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by imf12.hostedemail.com (Postfix) with ESMTP id 81EF44001A for ; Wed, 12 Jul 2023 15:18:06 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf12.hostedemail.com: domain of alex@ghiti.fr designates 217.70.183.198 as permitted sender) smtp.mailfrom=alex@ghiti.fr ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689175086; 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=RLs7mDe5ysZyQptk4Kff6x/O694k5oVZKlYXoGkClcU=; b=Drh04d2CtKDhfgvC7TPPQibQWrosIvxpBZ2aH/YlggD94TEGHdlo9mUkX9yGJEZigKQLPU tv7cn6SpOqKUXwEjFqBYxAdgSQJ4mMHFK2+uxAEfPpwb9EIdGouOoCtfw70TpPLUocKSqj 0uPLGu2O6+S2LFM6ofepEbIR5rjOsgI= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf12.hostedemail.com: domain of alex@ghiti.fr designates 217.70.183.198 as permitted sender) smtp.mailfrom=alex@ghiti.fr ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689175086; a=rsa-sha256; cv=none; b=TMrXKw82UsuGlCx5RztGxvpN6BnuonaHvFExCNULaQx3V+UGI0owVY+iY5xcPjoMaSp3uB LgFWo7biOd6kQYhyeCbF39swD+iMSpHUhX8MsZ2LXi6g3UhLkinFBBDYfvaQJucrfG7oKI +bvXVURJM1Qc9xgGqg7PMhULgNLoQJk= Received: by mail.gandi.net (Postfix) with ESMTPSA id ABE1CC000B; Wed, 12 Jul 2023 15:18:00 +0000 (UTC) Message-ID: Date: Wed, 12 Jul 2023 17:18:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 0/4] riscv: tlb flush improvements Content-Language: en-US To: Conor Dooley , Alexandre Ghiti Cc: Will Deacon , "Aneesh Kumar K . V" , Andrew Morton , Nick Piggin , Peter Zijlstra , Mayuresh Chitale , Vincent Chen , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230711075434.10936-1-alexghiti@rivosinc.com> <20230712-void-sniff-ca1abcbc7783@wendy> From: Alexandre Ghiti In-Reply-To: <20230712-void-sniff-ca1abcbc7783@wendy> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr X-Rspamd-Queue-Id: 81EF44001A X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: tzqkzqiqatn5ftjhbcmxxr7rxth1yss8 X-HE-Tag: 1689175086-640566 X-HE-Meta: U2FsdGVkX1/qGDx7LnLZ3VzMkOKeF95D38p7CImylzoQBQZyZf9JSQrpc4c9vhBIaxLikObtqY3FswscSmmPrWHMlzxdsHDJFvFa1f5g94nP4li2GEisNRLS3A8712x5FV61AOb8OS26humg/TYLQAqzvqBEoDSMELnrqK8QmqhHk9iEYoGjtMcuQwLyWpFzTV5gyg4wkeolu0fovQa+33YNB7LvK+Agc3qWt1jHoWrD9uKwwi9DSdf+ZWkcYQAaySUEZkfteHk9UabwPnHbIBkYV4IN9OXaVSFiQ/YK0YjBtAnfQPNcTc4xRKUd/I8c4b+HVhenYZrejPqj2okJdOaKSGzZkZ/sp3fOpUzzfz20NSiZvXmsqmVpumHHhUV+azOb+ha3x69nXXt+nbMq/Ix4U9pdmKgpLiLruSWUUE0fP7fdoPoN6DW94SEOMhNFsYtWKN/+8Km7ZDQxaWzbx968Q/5yaCb90DJiQxQWBhI2DDW4fpylYl8Ramx2VxJp0F0L3rZvLjjv11ub747OwC9MVKaIapwxNpJcn3UZQDUaYHUNYuvn6W0m44GtAKiJ3fF7+urBPsRL/wHyQgLX/cHhV1eYSzzN+EE+ECki0jZRJiGg50jisMDAZmwHSgCR2Gu8R2otIlEzkzX+D0vAvVWVjKEAbLkzuVF50wkbES1xhq8Zsv1u7/NbhtK1pde4oFJFdiCgYH6Q2CHxcEeyH0H05aJrAtV9PemFb7ikbacJiv8IPjrrH2mB+K0ZtGQJhjbx1x6IxzsPVdNdOOTNE7JjcsadNd5MKiBFM78z+QGxubSAUUNRrtVYsLvpzp/Rp2jtlGEp8cmPVNfcZlE8tw38JSpYZ8Bt28u/dxgzCATYbXpgJMmgjYOeRhYRuAQGP3y48cYd/jYNFl7Hi1XZIvZc8Z9NHsojTTJ5X6VFV8oIxm8auRByvK0WdqqDslsohziZxyB4ke2YPjZgYPI 84B18nqG Tds9PEmV5qYu5B8A2Y04TbzFCHqyuXbjXiV/ZJLGkAD6kCFR+hWBeoLtK7EKmW9a7IfBTGW+qWGIZlO1WWRHUQyZou8TLNr3QjrizqMAvskIstt051YYLz0/CV9YQMtvpu2y1/g2GdOJdl3JB7ArkUWEDq77Zs00oFiV7 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: Hi Conor, On 12/07/2023 09:08, Conor Dooley wrote: > Hey Alex, > > On Tue, Jul 11, 2023 at 09:54:30AM +0200, Alexandre Ghiti wrote: >> This series optimizes the tlb flushes on riscv which used to simply >> flush the whole tlb whatever the size of the range to flush or the size >> of the stride. >> >> Patch 3 introduces a threshold that is microarchitecture specific and >> will very likely be modified by vendors, not sure though which mechanism >> we'll use to do that (dt? alternatives? vendor initialization code?). @Conor any idea how to achieve this? >> >> Next steps would be to implement: >> - svinval extension as Mayuresh did here [1] >> - BATCHED_UNMAP_TLB_FLUSH (I'll wait for arm64 patchset to land) >> - MMU_GATHER_RCU_TABLE_FREE >> - MMU_GATHER_MERGE_VMAS >> >> Any other idea welcome. >> >> [1] https://lore.kernel.org/linux-riscv/20230623123849.1425805-1-mchitale@ventanamicro.com/ >> >> Alexandre Ghiti (4): >> riscv: Improve flush_tlb() >> riscv: Improve flush_tlb_range() for hugetlb pages >> riscv: Make __flush_tlb_range() loop over pte instead of flushing the >> whole tlb > The whole series does not build on nommu & this one adds a build warning > for regular builds: > + 1 ../arch/riscv/mm/tlbflush.c:32:15: warning: symbol 'tlb_flush_all_threshold' was not declared. Should it be static? > > Cheers, > Conor. I'll fix the nommu build, sorry about that. Weird I missed this warning, that's an LLVM build right? That variable will need to overwritten by the vendors, so that should not be static (but it will depend on what solution we implement). Thanks, Alex