Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1399334rwb; Fri, 28 Jul 2023 08:54:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlEROzBl+T2scQUHTFPq52kK6wgCwQYAKnqXWAmxSCvEp+JdEyS4JKNim33Gu3nEK73aERQw X-Received: by 2002:a17:90a:fa81:b0:268:5d00:3751 with SMTP id cu1-20020a17090afa8100b002685d003751mr1686102pjb.10.1690559642314; Fri, 28 Jul 2023 08:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690559642; cv=none; d=google.com; s=arc-20160816; b=kehJi+def8Nl+irqWc72gyAvIHPFswCKw2bP32RPYm3A7YqZqCIthSi0QEQ9N3jWSL GW9oxDIGc0wEu1a2PMK6vtAPOCNGL4H6vkzfeR6Qrqs9MjedYNjlWdgnA7U41qDOwzuZ I8PToQOK5JWNvqNnM1yXmm30HqGfCgfJpVVj7sGJ2XTVLgfBSJMuRuCkGXzEyarn1ee5 FovuxyEeEZpixpDL0X3soYYZgOUEPhCe2dyRyNhgjtmoJMJPZk6kTk4u1A1C3+VTOZmv MbjHYvXhgnDMMC3JprgmpgQ4FsOWKKi7mVYS6q3qErO8Z76SaeX1WJgNLMVeZjstwuwU iZCA== 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=pjWxYuMkYyCYydGZYyJb4wLVfHb9S4Js5IwnnFB0XSM=; fh=PT7uWiHsMDulxPw+SzAnwRDP9jn/UBIbv5TZuChOeZ4=; b=fDbFMr2k1VNVGYResLMVv9R4x6lfO8Hct/gzUAWSZbBVcs4r3X5QG5Qca2vkHq0PQ+ /lQJVdGmzvpsNuwtP8BOZInHDU4MwgHim3yCgj9dd8ctOhYLEZB2cLCl2f0xZi2WOBcW hvTRPlc5LgH1UVdf78/krw1PVY7BHQ2+kwrTkrXJ+ZL6Srf2eEb004dirvQzJ0eut65o TT6CzIe6LmbaRsbIxbUrTNp7JUiHK/EEPwhk/7kHLhwCa83DD0/pHSIer/mIMrvK2q1S 8L31iSoxzGJgEyXcwp7QIrLf93VgV0226hLjfiF7SW+4C2yROhPxDw5xKKogDFDP7+1N zu5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=mrIibh3D; 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 v7-20020a170902b7c700b001bb9370760fsi3182746plz.90.2023.07.28.08.53.50; Fri, 28 Jul 2023 08:54:02 -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=@ventanamicro.com header.s=google header.b=mrIibh3D; 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 S233869AbjG1Nft (ORCPT + 99 others); Fri, 28 Jul 2023 09:35:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235967AbjG1Nfp (ORCPT ); Fri, 28 Jul 2023 09:35:45 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E83D83AA8 for ; Fri, 28 Jul 2023 06:35:15 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-99bf1f632b8so66809266b.1 for ; Fri, 28 Jul 2023 06:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1690551313; x=1691156113; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pjWxYuMkYyCYydGZYyJb4wLVfHb9S4Js5IwnnFB0XSM=; b=mrIibh3Dlr65plPmb3Z5x+BK8DLfVVHVgMxww4xnQSb3VTUTBAhXWOncfguFuNeGNX MGsDK3J+A8xpOpSJrr/dv0TihJRHPUB9q9atC/ZgxkMr2lAponsucCOMIlt9Sd1oyHI0 pNBr5+KNFgBYRwp/e1r5nwpJaAtvBmzFYiAetPlrGdBs0m+Gp9YL81CyIkqTZuu1PmDM T2cXP6wX/WgEj32CGATYB59Tz8DEYlqb7yCYpb0rxCi6wiXXxTMA/eFZGlgkmeEXKEqt aN3bg3giPBpxEgAdV+QB9qygbyiPBv7i5ufllQpPlE/w4NmqPtSt1iX//pWE8MIo+cUn NfkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690551313; x=1691156113; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pjWxYuMkYyCYydGZYyJb4wLVfHb9S4Js5IwnnFB0XSM=; b=PQwdllSAXTzWPqdTbWkPCZeQPWVu1gTI9MG37JlgUERV/lHV7FCpc76uq6dvAnie6I Z/wK9mCXg6m8k81TzrsWWzwtFC/+bTV46LipoblUqOQLkhw6Bk3Egx/WW45d/LbALiMv NTWwsiRBpcI1xxCSvY8lonCmGx29VJgCJzugaMDaoV4X/3mPW0jUjbgnAo6RfgTTgf9O ZujnjU7OgnRactjY828okd4qVGTWNgywEHgwQFi4FQTgNz1sIytuAcEEE0IOMwLpjcKg HEp4wC0FkhwIXFvsr7PANB2EJKtyb5KQ8BUY8LrRho7139YnPiIAUjesp1mVtkFEKjEK Zo5w== X-Gm-Message-State: ABy/qLbrpwl+r/hHUhX+3DRtupjxW46RlxuQ7LQEbip212w6HJOGaLIx 5s6G992j51ouXaL1IXykLkwWQg== X-Received: by 2002:a17:906:2202:b0:99b:d1ef:520b with SMTP id s2-20020a170906220200b0099bd1ef520bmr2223467ejs.31.1690551312875; Fri, 28 Jul 2023 06:35:12 -0700 (PDT) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id m10-20020a17090607ca00b009931a3adf64sm2111178ejc.17.2023.07.28.06.35.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 06:35:12 -0700 (PDT) Date: Fri, 28 Jul 2023 15:35:11 +0200 From: Andrew Jones To: 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 Subject: Re: [PATCH v2 1/4] riscv: Improve flush_tlb() Message-ID: <20230728-d89388540f7ad14318ad768e@orel> References: <20230727185553.980262-1-alexghiti@rivosinc.com> <20230727185553.980262-2-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230727185553.980262-2-alexghiti@rivosinc.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 On Thu, Jul 27, 2023 at 08:55:50PM +0200, Alexandre Ghiti wrote: > For now, flush_tlb() simply calls flush_tlb_mm() which results in a > flush of the whole TLB. So let's use mmu_gather fields to provide a more > fine-grained flush of the TLB. > > Signed-off-by: Alexandre Ghiti > --- > arch/riscv/include/asm/tlb.h | 8 +++++++- > arch/riscv/include/asm/tlbflush.h | 3 +++ > arch/riscv/mm/tlbflush.c | 7 +++++++ > 3 files changed, 17 insertions(+), 1 deletion(-) > Reviewed-by: Andrew Jones