Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1310252lqt; Fri, 7 Jun 2024 14:33:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWgBAVbY/D/O0fM5kMwhNTnbSIzbhF9sDtfywaHwLM9tBqd1T57g8VYzaY1kfH5kPNQoTtrC/UdQt86GvQR8Ag2HKl0WthfmDplRKygqQ== X-Google-Smtp-Source: AGHT+IGBKRpKi7BiEEv+M//8NIw3mPRgclxEYdW7H5+ZBbqwrvGnY62Jm3req/zVn0MLdT8v98x+ X-Received: by 2002:a05:6e02:1a4f:b0:375:8f18:4577 with SMTP id e9e14a558f8ab-3758f184924mr14544295ab.9.1717795982872; Fri, 07 Jun 2024 14:33:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717795982; cv=pass; d=google.com; s=arc-20160816; b=ZgymoGd+BUP4ZIyqNIGE159n4qK4SKtnJojAAtpv7oyzGBPaeBqUyhiaQjerJhMLhw MSqFYC+Jz2w3b6Feh7vhg+wPO6X5C8usmgeu7GNF8GHPvwZVpK6cfdzbR5vhixldhpQw CugLCqxk8AgcjZqBWF+hPhC9bBLd7X6+9zVkWE/lVoxA1eORr5fNLAc6qYsT7+zKqH0J 8C2Fl/Cs+P/IfHuAqBHiYSdR+qdWhsYcRT8aPLqDKzz7mEy7tH749GZzGVAYr5XJeZdj 4IC6OlU2bWLsENRfiowXl1aIe/FeGySkPdLAHAa2kSrla5rtQwXkgTx0ZpP/ed5AhxSn t6QQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=en5rhVQeS4jMQZ7MYT9HPVU5AsizJ4lSBaI/jISWz7g=; fh=rn9sSvoGsLMBRqkoIL7dwXkFGIz9BB30KG8jdyB/Wgs=; b=MfGL0Z/Op2uGruzyM7hf6fSbiGCXHV8JqCXMyH4VuaJv++Gs+JfaFWxa19peJqcdH9 igdwnM4Dm9dqjYuekDbFFe33q2EOBPdeb8n7donNTs4gW+UDTjz21mFX/3bgmZKjm3+n C7kOUSeUqYYC9jCGX00v5Gd2DY+Cy/CxdSU2UF6OyAVgP8mqoaKwKDinTTTiRIO+QoXD 1cRT6R7ujSHj2ysd/0a2ylmXw1pMToWBt0tfPX7FpVUtLNV4zXpicgtXMZ4L2Vc9HRmx Zs/lqMUZOZliF+GTcXw+HSqydPF0auSrPqGKV5PHDBuB+qqPY/+o3Otseup9t4GncZSw IhEA==; 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=h+n7Bw2j; 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-206774-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206774-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e35261fb9esi1641210a12.361.2024.06.07.14.33.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 14:33:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206774-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=h+n7Bw2j; 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-206774-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206774-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7383F285AF3 for ; Fri, 7 Jun 2024 21:33:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16136155380; Fri, 7 Jun 2024 21:32:55 +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="h+n7Bw2j" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 A2AD84E1DD for ; Fri, 7 Jun 2024 21:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717795974; cv=none; b=m6QSWvGD88TCFHMUJ+/sWIWgi6VXyno8oUkdwvDkHjEDz+UsZj3cL6tFYoelxwq4CP4QITxnTV5C2n1VnLbLmrtx4julqEMxIHPjMclX9807R9QZDWzFxWdZ37sKnZAtlxXqvwTtCV9r+0WQCwmRviKCUAqhFmCFG9yWpNfmDZ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717795974; c=relaxed/simple; bh=8qHPzm5a5JgFK8worTleaMJ20xoqkrEwmZZqgOn913I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MdAiCqE6mTNZQxJ9VzdNSVNFxT/fnSe06cUt4CmLB5DW5gADcPCWwDiakadt6FzntkCM027lcmxZ2+4qsq5NR0ZI56/D+XrLvGJyPjLdHfdLEWuXq1IctaVgjxNEsWEEL7sZJPIQAeNmQ/GbdlBRD5rXoQ+jl6OLMZNivEsjeg0= 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=h+n7Bw2j; arc=none smtp.client-ip=209.85.214.177 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-pl1-f177.google.com with SMTP id d9443c01a7336-1f6559668e1so22765265ad.3 for ; Fri, 07 Jun 2024 14:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1717795972; x=1718400772; darn=vger.kernel.org; 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=en5rhVQeS4jMQZ7MYT9HPVU5AsizJ4lSBaI/jISWz7g=; b=h+n7Bw2jIFjjjb2AaQFDJKBQ6fnQgmYdj6kCxAXBUGkAImlg1AJCr1erzHbODVI1xC 6ctSS7OTfikXmwUvHPknG+LUT2wX8AoX107B1lgQ/YV3RuajHDLmq4XtiAYypMQi9byD uAUO8qqTF+CP57fVF5jwbG/k9t6YktG3cdtKwWrJ7DKmuYekf1fJj0/iuWvC2GjXFEkR IUVJG1cWKNk/HNpnGHUsKOwU8rbL1Bd9xpmsraXPJ2ZUyJjcMjXXQ3FKQNR4/UJyFA09 YMq9Ch75RWOnNZIordgppqV+YuOLeaT0QC6a4asfrSGKpzkW3sxaD7m3s1owgF703qBc 7mMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717795972; x=1718400772; 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=en5rhVQeS4jMQZ7MYT9HPVU5AsizJ4lSBaI/jISWz7g=; b=QoiqHOikqNEGfdpBToAOh1OKaiJk3VzDQnxeZevZmQoHSQKyJW7WQitfTKpuIbhvwd +vEK08ZRzwt6JgOCV/wS2Rqjrh530j3YlPy84/jGPa1H600ss5lJDt4ouMO+FkZgt0Ws h+v3NXitJOteEUPfGArwccd5ZJnjjYpMkxxlN228vNpZb4nA0Eua2TNODVJ3pffevWnB mEU96ebNACk2nGGpZHw2rNpezw76EHB1p3xzZD4rRcMIPBLohnew525L6fecRn02nJa1 q0USbYRUnGENTMWqwMkC5cfbMy2gyJcCiPoYHmDc+nC43DsLLzqqPMxD5l4riG0DjBQe Os0g== X-Forwarded-Encrypted: i=1; AJvYcCXAdExlecHzMlrdrvOSIvIne5eU7ZYu+cpL1t0FgbhJGUrc3UwRIbtsXxvNYYsCIVfEchXqX/jK2vJRfx3w3cYED2mMWuuYrLF685Od X-Gm-Message-State: AOJu0Ywz28ibOadiD5mWUqJgVeywwe2+4RnsiqIXIFVHyDVze3Y2ovda KXqQeRgBeAMdlPNVxeie5XQ6SaLLUn5qptDE6ahjSYZiWTYh7UWUioenNhHEok0= X-Received: by 2002:a17:903:244b:b0:1f4:8d11:723 with SMTP id d9443c01a7336-1f6d039d26fmr43937765ad.51.1717795971902; Fri, 07 Jun 2024 14:32:51 -0700 (PDT) Received: from ghost ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6e78585desm10762055ad.133.2024.06.07.14.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 14:32:51 -0700 (PDT) Date: Fri, 7 Jun 2024 14:32:48 -0700 From: Charlie Jenkins To: Conor Dooley Cc: Jesse Taube , linux-riscv@lists.infradead.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Evan Green , Andrew Jones , Xiao Wang , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Andy Chiu , Greentime Hu , Heiko Stuebner , Guo Ren , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Costa Shulyupin , Andrew Morton , Baoquan He , Sami Tolvanen , Zong Li , Ben Dooks , Erick Archer , Vincent Chen , Joel Granados , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] RISC-V: Detect unaligned vector accesses supported. Message-ID: References: <20240606183215.416829-1-jesse@rivosinc.com> <20240606183215.416829-2-jesse@rivosinc.com> <20240607-wildfowl-baggage-54f622e18c4a@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240607-wildfowl-baggage-54f622e18c4a@spud> On Fri, Jun 07, 2024 at 10:21:19PM +0100, Conor Dooley wrote: > On Fri, Jun 07, 2024 at 02:06:27PM -0700, Charlie Jenkins wrote: > > On Fri, Jun 07, 2024 at 03:53:23PM -0400, Jesse Taube wrote: > > > On 6/6/24 19:13, Charlie Jenkins wrote: > > > > On Thu, Jun 06, 2024 at 02:29:23PM -0700, Charlie Jenkins wrote: > > > > > On Thu, Jun 06, 2024 at 02:32:14PM -0400, Jesse Taube wrote: > > > > > > Please use the exising UNKNOWN terminology instead of renaming to > > > > > SUPPORTED. Any option that is not UNSUPPORTED implies that unaligned > > > > > accesses are supported. > > > > > > Conor didnt like using UNKNOWN a proxy for "SUPPORTED" > > I did say this, but in the context of wanting you to actually add the > performance probing (and potentially the other infrastructure that > Charlie added for scalar). > > > > Having SUPPORTED is better then assuing the speed to be slow. > > > > The HWPROBE key is about misaligned access performance. UNKNOWN means > > that the performance is unknown. > > Right. I also don't think that assuming "slow" is even problematic - > seemingly all extant hardware doesn't even support misaligned access. > But really, just whack in the probing, it shouldn't be too bad, right? > Yeah that's a good point, slow is a reasonable default. > > The scalar and vector names need to > > match up. > > That's definitely not the case. A different hwprobe key is allowed to > behave differently, but... It of course can behave differently in purely technical sense, I said "need" because it would not be a very intuitive interface to have a different name for vector and scalar versions of the same thing. > > > UNKNOWN was already merged and is supported by linux so if you > > want to use SUPPORTED here then you need to add a scalar SUPPORTED key > > that is an alias of the UNKNOWN key. > > ...this suggestion of a scalar change I disagree with anyway, so it's > moot. Unknown should be a state that we only have internally when we > actually do not know, and not something that userspace should ever see, > unless there's a bug in the probing code IMO. Unknown gives userspace no > actionable information anyways. > I agree, returning slow is probably always be more useful than unknown. - Charlie > > I would rather keep UNKNOWN as it > > is, but that's up to you.