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 4F21BEB64DD for ; Wed, 12 Jul 2023 17:20:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9FAD06B0078; Wed, 12 Jul 2023 13:19:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9AB186B007B; Wed, 12 Jul 2023 13:19:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 873258D0001; Wed, 12 Jul 2023 13:19:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 773746B0078 for ; Wed, 12 Jul 2023 13:19:59 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id ABB4C802DB for ; Wed, 12 Jul 2023 17:19:58 +0000 (UTC) X-FDA: 81003622476.22.47AA9A1 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf05.hostedemail.com (Postfix) with ESMTP id A01EF100023 for ; Wed, 12 Jul 2023 17:19:55 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="JWosN/cG"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of conor@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=conor@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689182395; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Cv3oTkvtsDgg/0W0GXZHb0omw11XbdBsada088+dP8U=; b=JeE1lRVd/kkXHlRXqXM4QJhrSqVrk6mO3kYh158wijDzoFDiF6sr1k1CvjEQPHoD0OKQgC zffrZGIz8/47vsudZTvP6kXWCZu4NxC3z3WzqtSTKu6oqZJKqnTOMVor5TTSj3rNWvgHk9 WNdymXVXYH8ghBdP55bX4EsW62fGX5A= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="JWosN/cG"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of conor@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=conor@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689182395; a=rsa-sha256; cv=none; b=YbHhz5E0XvEAYPWKWO0olSvkYFKMaG7qqiQzPbH+Ec8fy89xacF5vFsyxqn6GT/WgIUR3Y eeofBvGA0JlZh0A4+6OMLwHRFYiSTdnWwze7+YLze0aASO9kukzrvqJG3qAJxLLpwZSfTs 46YJbWOUjwalnVDTGYIA6FyKbTQXH90= 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 7ED636184D; Wed, 12 Jul 2023 17:19:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35553C433C8; Wed, 12 Jul 2023 17:19:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689182393; bh=NxFeXC6CtmYi99+d4gGQB6D+Bb2HkPUKwYRt2ccCYQ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JWosN/cG07XL+NBD9hRPcvNHuIa9Z2RkyHTjLz/YHDehnzNvz/z3P3BBJt1aWu8n9 BP0okhPpaLzPAmlmVWRMwYiNtgXpr+sTdyWCGWQBDK894nKN78fRU0MKF21RlV8GRj pcXfRiAJ7VN384hIbC1zcAzEBCw6CrzoTmaYzC6FGtJ/vzN9C4O299sGNkc1QsRDF5 lixMCTjInOfxqhtWN/qvydwb2M0Em8xu/MQx+5u9gjQ/iCsRotbfXVSs0qc0bJoFGB u2EgewEB3jkW2GO/GZXNfdcXZHnnTkkiQmTQAaNdKq8tweJBxNZ8wjbd2M+I6ZixYa fJhWwdVICoeSA== Date: Wed, 12 Jul 2023 18:19:47 +0100 From: Conor Dooley To: Alexandre Ghiti Cc: Conor Dooley , Alexandre Ghiti , 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 Subject: Re: [PATCH 0/4] riscv: tlb flush improvements Message-ID: <20230712-frying-unaired-e3acb5150e8b@spud> References: <20230711075434.10936-1-alexghiti@rivosinc.com> <20230712-void-sniff-ca1abcbc7783@wendy> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DukaoZmy8ISySIVX" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: A01EF100023 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 5nnjym7qazdc34u5d47763789zo3qau6 X-HE-Tag: 1689182395-784906 X-HE-Meta: U2FsdGVkX1/M8MoYuVrrnYzrXDoU9rAT2HncXTn43casSlgTGgcSJitFQJxophBVDzNpbSh/TO1hAU7bfMOix8q5okuW6jU0tlVT0cYdTryCYNZKlsG3G8njdmvnc6WrEtUm8kRE/a8RKGwewSIuDSlMv1wwqImWVG6+isbXPB9DYbc0Qg76Em7GLAmkVue65fxg3EE9d1VZW1/9tPl7ME61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xZCL3o4RKA8dcyn8Sa58NVIei7NQAQDqHKTdOV8KBXH/U2IeXeS1NS5L+83KOO4FXHvJvZSpNC0GM4RUopN/miQuhCHnNByCJxDY9VkyLwdxCbvFXEAiW3boq4NX/wu8N5FTxVYeyu3O+Nl875wrrlr6XOTKdFHHKK6l+z3Hdg1gn6TxLzjAjfgQMB2cYPHh294jvcUWvCW8wBqsOo/cV18 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: --DukaoZmy8ISySIVX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 12, 2023 at 05:18:00PM +0200, Alexandre Ghiti wrote: > On 12/07/2023 09:08, Conor Dooley wrote: > > 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 si= ze > > > of the stride. > > >=20 > > > Patch 3 introduces a threshold that is microarchitecture specific and > > > will very likely be modified by vendors, not sure though which mechan= ism > > > we'll use to do that (dt? alternatives? vendor initialization code?). >=20 >=20 > @Conor any idea how to achieve this? It's in my queue of things to look at, just been prioritising the extension related stuff the last few days. Hopefully I'll have a chance to think about this tomorrow.. Famous last words probably. > > > 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 > > >=20 > > > Any other idea welcome. > > >=20 > > > [1] https://lore.kernel.org/linux-riscv/20230623123849.1425805-1-mchi= tale@ventanamicro.com/ > > >=20 > > > 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? > >=20 > > Cheers, > > Conor. >=20 >=20 > 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). Just make it static until we actually have a vendor implementation of this stuff please, since we don't know what that will look like yet. --DukaoZmy8ISySIVX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZK7gswAKCRB4tDGHoIJi 0sARAP9L9TJFvX4OL1Vu0rUL3dlGaM7MfIeHb3RG1JQ34iSI7QEAo13IMSfJ0aYS 1YYxInR3X7k1leS1v4O0IaTHUsMX5Ak= =ebMg -----END PGP SIGNATURE----- --DukaoZmy8ISySIVX--