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 3FB7AC25B78 for ; Tue, 4 Jun 2024 11:44:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 82E0B8D0001; Tue, 4 Jun 2024 07:44:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7B7136B00B5; Tue, 4 Jun 2024 07:44:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 658A08D0001; Tue, 4 Jun 2024 07:44:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 460946B00B4 for ; Tue, 4 Jun 2024 07:44:30 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 8037140A15 for ; Tue, 4 Jun 2024 11:44:29 +0000 (UTC) X-FDA: 82193023458.16.8E2AEE7 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by imf26.hostedemail.com (Postfix) with ESMTP id 77BB314001D for ; Tue, 4 Jun 2024 11:44:27 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=k93aGkom; spf=pass (imf26.hostedemail.com: domain of alexghiti@rivosinc.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=alexghiti@rivosinc.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717501467; 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:dkim-signature; bh=3BXu54JL29te3bk0JIakNdnue3MoNyfA1fQ0KpkafnY=; b=KrmsGaxqfRcLplSCTQPBG06UxRFXcUjtu/5/8abtDkiFr58Cseg8Bz0yxM4pbOBrrVbbYx OwvWPW+EoPUCIoJqXlTxYSXEnVcuk+51LUUpixMBDx2T0Mgr/qt0NBHmZy4gsBomlQcABX VcK9gnnGw0/A693qIeymAi7Le+z/y2o= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717501467; a=rsa-sha256; cv=none; b=VX5ZxMli+NATsOSMSD1utnKCaa8Xe5vMeVd2UyzhexyzKdAFJ1Y3ck3yBHvUp0e9CUCpI1 LL3LFdkkcc+slB6kHgNKBDU7KGxvWmVAQ++rW6BkVQ9zXtzgU9dWQEB/q5UaugmwIobmDu wCMtHzyEp0FIcYn8iXUix4gIKkBSJ3U= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=k93aGkom; spf=pass (imf26.hostedemail.com: domain of alexghiti@rivosinc.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=alexghiti@rivosinc.com; dmarc=none Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-57a30dbdb7fso1311229a12.3 for ; Tue, 04 Jun 2024 04:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1717501466; x=1718106266; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3BXu54JL29te3bk0JIakNdnue3MoNyfA1fQ0KpkafnY=; b=k93aGkomGMEOb2Xy9Yglx/zgrgtPz4m2YN8o69A7HJeQObYqCyhH5octt4QK2e//kV TIKPFdtrjc0KPIRFO+z4tHaNLrL+vmv5MU4tTRnxun+4TehOnxmFLdzLuNHNviQTdQuE 93egcjyMF15/zUpU+C/02V54bTwZ2l28GnFFAjbw9E6+XlvoLidJciB7g8VIyyb1T2jO uTI5X+ZA72yYqeOI2RZ9xwCipvRqIhB1hn0FLm21mWvSzWh4My3knFFbVm7/3Cg9gAga YZeaLmYnosiD7OUNrVlX3g8yDXZwniFnyiXXS7bprL8S9BGrRPQPIpjx3OWZczec4AzG cwuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717501466; x=1718106266; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3BXu54JL29te3bk0JIakNdnue3MoNyfA1fQ0KpkafnY=; b=suF6LPzzg8hlHB/Vc8slQget1Ir2sROFniSw12BWN3GMSqZpBuX/PdhCCsHWadqXVy xFKuapjJmr0gYj+BnPRYGOmJNCzbbwZ8IRxmF7Htt4F2Lzqoawoa3Ct/Gss8iysLvoFF 2bFDqbyqbf5bMt37hJhbt6BEjPH2vS7U8h5vMV1GARBTPsYq/UcKSstM1W3K6m0dajpp ALBvdynxckhoT0MjcDdUKl11pMEFym1tcowOpKHEryPD4W8eLS0nYUpv+VhPSQ2mkVzw ewkec2QYrVqHng5OBssW09UWnbk9eLBe3JkxckRWEt+15pO2UY3OVIBce5fTehCWBrzb lkZA== X-Forwarded-Encrypted: i=1; AJvYcCV9t3rDHp3jBlnIBVSIN/Ro2ex6PT4TMKjcBvPCbOYNgdXsDekVnipKPea8E6hszUB2wC0kvHeVH4wkaDdj8KXgAiE= X-Gm-Message-State: AOJu0YxSO6d0mbT5wg5VvdmUMKDwS3yGlt1q3lMDujvVCGj/hXRArp6t Kd5Y/AmiaBHOq5hCSRT0EK2iSa1QHM6YcmEthq9tRpJ1OBxS1D+LdYOBYUtk2XKLY+PgigsRDmF F7mQFFGwQhpe20jGBgnHv1tZnRUI93z+oXMnHqw== X-Google-Smtp-Source: AGHT+IF5j0HlHcUwqZev1qhJa4XLMrGdrhzyscNN/jd+ZNq5k0ymbm8yvqEpsVyAB4LEq75CK9UuVo8NGyvZXeKaCp4= X-Received: by 2002:a17:907:7ea1:b0:a68:e9dc:b07 with SMTP id a640c23a62f3a-a68e9dc0feemr501609066b.60.1717501465846; Tue, 04 Jun 2024 04:44:25 -0700 (PDT) MIME-Version: 1.0 References: <20240131155929.169961-1-alexghiti@rivosinc.com> <20240131155929.169961-4-alexghiti@rivosinc.com> <20240604-dazzling-envy-1dcf111eb2c5@spud> In-Reply-To: <20240604-dazzling-envy-1dcf111eb2c5@spud> From: Alexandre Ghiti Date: Tue, 4 Jun 2024 13:44:15 +0200 Message-ID: Subject: Re: [External] [PATCH RFC/RFT v2 3/4] riscv: Stop emitting preventive sfence.vma for new vmalloc mappings To: Conor Dooley Cc: yunhui cui , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrew Morton , Ved Shanbhogue , Matt Evans , Dylan Jhong , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Stat-Signature: dpa7zg5pnmad7easi6571gbc6nscpzad X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 77BB314001D X-HE-Tag: 1717501467-403518 X-HE-Meta: U2FsdGVkX1/bUZpkSYbKuUVEPrqbD3s8Jal6uIYBM20F5q3oz8f/f7LT0cm5xw9vs0A8MnZIawng4oQ6a9GU4kiBzZc4Z0DdS7a5W826P9DKmjH66t6Jn9UySO27yrSZ3nbRX7kM9HKpum2zgfS4tzwbJXlCj8N1/fJ8wyKbLHCMH4mkUWNGvf3Z5tiiNvP7JQKeOxCy0DVoC2y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ncJrpjoHdp5Yx33KYkyi6tGJ7QdXnXRFw1EivakVn12Tx2quJ3+t1oGpwFR+urevbMfkJCNgRVO+vP8ArxsymL6UB0JfgVL5Z8Su0LlvByPAgoeUMbS6CrKs0bs0JAHm5znr5IV1xVf4wJVb+L3EGZOUKzUmY= 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: List-Subscribe: List-Unsubscribe: On Tue, Jun 4, 2024 at 10:52=E2=80=AFAM Conor Dooley wro= te: > > On Tue, Jun 04, 2024 at 09:17:26AM +0200, Alexandre Ghiti wrote: > > On Tue, Jun 4, 2024 at 9:15=E2=80=AFAM Alexandre Ghiti wrote: > > > On Tue, Jun 4, 2024 at 8:21=E2=80=AFAM yunhui cui wrote: > > > > > > > > As for the current status of the patch, there are two points that c= an > > > > be optimized: > > > > 1. Some chip hardware implementations may not cache TLB invalid > > > > entries, so it doesn't matter whether svvptc is available or not. C= an > > > > we consider adding a CONFIG_RISCV_SVVPTC to control it? > > > > That would produce a non-portable kernel. But I'm not opposed to that > > at all, let me check how we handle other extensions. Maybe @Conor > > Dooley has some feedback here? > > To be honest, not really sure what to give feedback on. Could you > elaborate on exactly what the option is going to do? Given the > portability concern, I guess you were proposing that the option would > remove the preventative fences, rather than your current patch that > removes them via an alternative? No no, I won't do that, we need a generic kernel for distros so that's not even a question. What Yunhui was asking about (to me) is: can we introduce a Kconfig option to always remove the preventive fences, bypassing the use of alternatives altogether? To me, it won't make a difference in terms of performance. But if we already offer such a possibility for other extensions, well I'll do it. Otherwise, the question is: should we start doing that? > I don't think we have any extension > related options that work like that at the moment, and making that an > option will just mean that distros that look to cater for multiple > platforms won't be able to turn it on. > > Thanks, > Conor.