Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38507534rwd; Wed, 12 Jul 2023 08:33:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlGwgeO/XLR9LwmKqR6Dqt22/N5TR2ld4qMq9y3m/VUIMS/nLUuxssdl4F9BknAQcbtR/qf7 X-Received: by 2002:a17:902:c1c5:b0:1b8:7e55:7a8c with SMTP id c5-20020a170902c1c500b001b87e557a8cmr15365739plc.56.1689176011080; Wed, 12 Jul 2023 08:33:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689176011; cv=none; d=google.com; s=arc-20160816; b=rFbDKJIxvNyJD8Y/KbGaNxktbf+G0T5JHRGkdNVk4w5hZIek+y8A/y/rVDDq0eGzdN slhVmN3V6+m9XNguCy0VWZQtVFnb/P/l6V9FrISWdEoqxpRoy2L1ZGbyDBqYxO70hIw9 4EwDCSnloA3SV+4W/orhk3uL6g3p4LiNP6AQXw0iYgsJfDpWl58iz0+MkxLSdHHG8SfS qwDqC9E1Xbez4NhmD1WOrIhlBunWUORjZJoMvdb+sUmhw6R0lkSZOnW3Tv13ucbM6JWS C//hO3ASQ7Dr8VTvg6C0v75TvP/gx02SxuURa35oq/QyhVm6fKeXPdpbMyKoPOZoLiBW bqkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=RLs7mDe5ysZyQptk4Kff6x/O694k5oVZKlYXoGkClcU=; fh=Mc2seSOzEd2JM9rvM93P9UCzW+6kUrOxNcaYE/+8kK0=; b=F62TzduP1owm8jFxtGYD2vez9U3x5jI/k/OS2cU6bgNHlnJXnOOrNi2LmFiksX0aEa TVImmGnK8Um9/GrLbRpAcLUxrA/52U7e06Mf5j1LBvlFddHJ0kSwHUegGos54Yq8ptKI q/UYsjpVNaDLzMGW/mo9ct0g8dr6aL/TcmCx7W+gnVhSQ81J51aqlJQ4oa/J7e6h0Mh4 x1ok5z0y6TJBfmA+BgUh4aVed6OYvPPzFWETCIpcsoF7F0zu4u9p/F4E6OJbOfCff2NN 6wUobfdWztgdQoNWggF5ma4mNS259GoO+O6RRgFZ8s8vMifFjdlp5Kio3NTcDZox2Ix5 vprg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a170902654900b001b9ffdd9488si1390960pln.624.2023.07.12.08.33.17; Wed, 12 Jul 2023 08:33:31 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233639AbjGLPTV (ORCPT + 99 others); Wed, 12 Jul 2023 11:19:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233629AbjGLPTI (ORCPT ); Wed, 12 Jul 2023 11:19:08 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAB4326A5; Wed, 12 Jul 2023 08:18:36 -0700 (PDT) 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-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR 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 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