Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp131175rwp; Wed, 12 Jul 2023 10:44:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGqMNRap73K70idCkFuz/4vJYqPLaPZ+htNFbmJexzncv0sS6f0HN/Ev38oQ442Tq7gRSNy X-Received: by 2002:aa7:cd5a:0:b0:51d:a181:d78e with SMTP id v26-20020aa7cd5a000000b0051da181d78emr19771974edw.27.1689183850899; Wed, 12 Jul 2023 10:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689183850; cv=none; d=google.com; s=arc-20160816; b=mQsYau7skZzUlGToMZoKiz8M30Zstr4uCZZIwcGvWs93D4mf7Ixo9ZYfTXn/yC32Ax FFcEe54bbrmA35Xp93sKT1AVsTRbJaJd5o3hp0kxTWEAWO1GfQrF/uLc3cEMTZL+qr8B GGYsc+XAxUooezwHr5IQnXY9vPuTC8Z1d95FOMNfdueZYN9R42aJTDSlIUpLI4U1G+pd Nh57PKuF/GTuP40lQmi6Hn8ovUH4+xTc1yQCPZIVEuzB25+KILG2orXAxTdKP+9mBI4W S8xCWIIhIn/wvhsPVCMyXEqyxCCj5+gaJCgLmdUjZPAxarWZgYwCPik6ihM6zDDCoj9z DBtA== 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:dkim-signature; bh=Cv3oTkvtsDgg/0W0GXZHb0omw11XbdBsada088+dP8U=; fh=+FsqTNZEkkhUhUL5/gcWL+gyrlYjpMjB+WhW7nIRKZw=; b=wOuiZa4nrwq1jDpRYT07lYQpI6gcv//LRwVEqUzfA7QLzCKHZ9v4qSCJ8Q8h6/qR3i n6gqu0n5v5ay0jC1Etywc1c2HIwlGIu7AQ9idgMmz3cxT8kEfjJ8KVQsAs3i2l7ci0A5 FOUuZlRqX4ySebgxmUVtclH6pda39ZoQnDZJfeWURaXSSXB6IjfdVL17eFAYLYyhyfg+ dZKOYU68Hr3muS4Ln2d7twruuIJQsBAkuELGQgpvWq1l1pCzIVR43SmqLUTW+bXVOkQp eWUYnyI29t6xh1w7HFLzIegbW0dXthfQ7hQVU2FH9ZdvH1OvATUw6VdwP6JE4m7McYnE vhKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="JWosN/cG"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020aa7c909000000b0051e0fa09c6esi4937213edt.16.2023.07.12.10.43.46; Wed, 12 Jul 2023 10:44:10 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="JWosN/cG"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232266AbjGLRT5 (ORCPT + 99 others); Wed, 12 Jul 2023 13:19:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbjGLRTz (ORCPT ); Wed, 12 Jul 2023 13:19:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4FA619A6; Wed, 12 Jul 2023 10:19:54 -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 7B1E16184B; 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 --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--