Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp44053lqb; Tue, 4 Jun 2024 04:44:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXA6FFkRGWp0WHzUDqaFzVLGiP7UEiKqmo+QFVERyBsONqhCgdU79rb/haAz2yjqdDmLjmwdU3gU45BfJUEfl1pgfkiRHKKx0fvFuw6qA== X-Google-Smtp-Source: AGHT+IEJ+dtzKXelKovUTOH0Uy3TkF6PB//9YOyPAwsbvOlxlTpiykpg63GSmmaCgKjdOGyumqgF X-Received: by 2002:a05:6830:a41:b0:6f0:e79e:f1a9 with SMTP id 46e09a7af769-6f911f26bdemr12145914a34.4.1717501485273; Tue, 04 Jun 2024 04:44:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717501485; cv=pass; d=google.com; s=arc-20160816; b=RTv2uyRATcbSRIhY3SD3u/97WbCx6rTzc+1JWjM/pKjA4tfTE1btgCreTglRlBx2BN 6PoibsjitNFQ5xb9xkYTm6u+rGuHcAfxtJ5aFHzGDv6wj7YHmDcsHRay0tmxw5Hn+pCO FeBEPd24MJJc7l4xfAkop5/j/Kb6bbuM0mpx3ssRH4pU1KjZh9COTp/d2bW1HZClMIaV S29pw8/GVYInH56V+GkQq6A0+u4hvTfLjnJxpbm5VFAqiGzQgSgh+LbDEpqhOz6/+Epe bPLi0OI2jfIhNEooIoVF77do3raoNbOxIIkCfcSeJcnmPLI7IThsa5BOXzu2L+xvvdor O/Fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=3BXu54JL29te3bk0JIakNdnue3MoNyfA1fQ0KpkafnY=; fh=jrf1ojp1+9PYu/ZnbUg4C1PguykEOBfJuLRAdqDg2JE=; b=dynXeKvkppowfIrd13E907qONLMMx3fFTveZ111VZGSn+ZB93wTi/7F0gTg+TlWrEj vhEN5l7/70KV6VTdAF/aXD4LUPNfkLR0nhWDIXZMsnFWuK9HwdiAQ7npfLnUC3K5w5Cr IaiHopfMHPO7R+Dugx4ayhOuqUwXcs/YeNsWK/1x/gHRBL6Dc8GoTRnB4eYpKRYZ0DRy NMNUfNQ6Ct73Nb+9jXH7HDdTYdmmAzth+LYPAdfTTd79uiYMEHnpEdu4kLl1cqy5TyZk DtAIx15BP0rPCZoV5Y03GX9z6Pk70pPRuX+q15foiiqVqzdaII0gegY/N2jKzY/TYq9V uGbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=PUNm465m; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-200529-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200529-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-7951aaea9b6si90767885a.571.2024.06.04.04.44.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 04:44:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200529-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=PUNm465m; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-200529-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200529-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E9B4E1C22299 for ; Tue, 4 Jun 2024 11:44:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42AB4145B08; Tue, 4 Jun 2024 11:44:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="PUNm465m" Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1EC01459E5 for ; Tue, 4 Jun 2024 11:44:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717501469; cv=none; b=DBxTIVjzE4vEAfHqELdvcGaI4UjVvLAAct2Zg8X7zTAnMI1ZkwFclWhFLDT3S9MFa9+ayjT7Hc55xEcGRg1s1M+1LwF447JhOksmFFarnWVREENNykUXqigtG+hIoPDAOadiGgX8xYmqWk27YXVu2Frd924yBZfZRvDaiulQhl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717501469; c=relaxed/simple; bh=3BXu54JL29te3bk0JIakNdnue3MoNyfA1fQ0KpkafnY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=R6qo8qgZPKAiuu261rneoOMuP3XuMgfCm/BcLfaF4Fnv4r0RkKArQAjGiIg1vXsLfxClM0lP06G5pzuxSlI3jCHvni3+Hqq/rdyBPQ7qfn1NGwcPRhutgTMd5E0Na/iEoSNxfjA295xeTPzN71xF22RDg2IJAgsdK0ak3LMEM2g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=PUNm465m; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-57a4d7ba501so967844a12.2 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=vger.kernel.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=PUNm465mt0L+oMsosDaaJ7pHYyJCaIEQFFn6bbrPcdwVwl0DvmsVU0FjLUKb2SCUK3 OpV+aZDTG1E7CUmKBDpFk6rW42+hWu/k9bZtOPElGsoyHDd3+EOlNqCDxc4Oxcoqab1C EsuE7Sw4lJyTu6SmglSltu4RvZnByV4qp91pt9eM6w3YMsHisr4gaErBQ8FIe+L/MJGK 0L9Txovpgdh4UwXc6ULR+L4TTEjTcr2Rr5QgO4FNI0yCXXcHIvWHgJr4NQnAQIDkcCjl ydBgOuIpXaMuTksEyS+I7hYz7CYJ6S2NwQm2vAtWNScKJ+FqhBNrheBnCaAG2QSncbSj Eu1w== 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=EDkPWnzGLRt1WjxvkQyz81tS9dvErW60sdz9w7iiGnuLpFQbyISwRRTcnzHrwbg9Ai lqEr9COwiCGYLgBoQwgw+bXweWRO9xws9b2PBiu7kYUBJg1bYfpGYL8iU8H2ljNXARSu JS6VxNX4celb/lUG6OLSa2UcHm+ofGkOMjm8yStHKzLuw/C8SGJlTxHSMeIqhhLAC83r x+HziKeM76scqZRypdTvxee4OGrLSHMy8KfXd6Zp4MHu0q5nJ4m1f8flug3kz72l4MsW aPnjz3Sm3K+9dMmw68r/ejb9fX10BQ0M70FKa4V2AKDYAYbiNPf7Smw626+rM7qu6qcR f92A== X-Forwarded-Encrypted: i=1; AJvYcCVkZI31oMi7YuYrdi/z9tqWIHKKKHKn7G1De+rmLMEel/t9FSthFm3i568RougvY5Co9GPk3YkCNsmEFZzKKMIqtLn0/srMy/+1uJly X-Gm-Message-State: AOJu0Yxsi4W3bn09BYxk1IYoOP4xxrrJ5jyubwiXnEkM3/+WFQO/HSuY vMeUVPKiKMI056VpGcAfXZXFPHolFGXdNI+AETKzDGNcXjFMIPLOS6sB4qMMGqQ0XutJAirX68D wyiui2mxuge2mlQlQxptYEU/6zilHB4fTwZv5/w== 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.