From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id F143B3858D39 for ; Wed, 29 Mar 2023 00:01:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F143B3858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pl1-x632.google.com with SMTP id ix20so13315851plb.3 for ; Tue, 28 Mar 2023 17:01:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1680048109; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=Ip2q8NQNNHfpPDAKqOEy+/0XHxzlZlETY+K86KiZdgA=; b=r+GPcSP+gv30oR4F3rnPpPP+m6oLnd2AXDW3HrO5q0qHlHPbRyBnwXR22iv1c/jEvC IKfZPSfDQbmkG75GyLBr31FdQm9jkd4tvj9vvuQUxiWF1A+m2t1u4L3ZRPimsw/iIOEQ 490TMzSQVNE3ptZylrT/yQxmrXdR0j94usg6dYVSxwKVueaO1RSEP/hIctykDgByI8i5 ATD9qxTd6v+nOyKXtaQ/FfSILwCJRnu9LV3BgTV3z0A5BI5J4Mtbo2PMAEUs00oSPuMu 9NalwZrQ3U1nFqE8DIV9GbUy+oaNiO+RqhLOqBO4N/hBAGCOVplMFy2I9wxD3R1W2tpl TVAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680048109; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Ip2q8NQNNHfpPDAKqOEy+/0XHxzlZlETY+K86KiZdgA=; b=nmx8Lgas9kWi1A3SCBQZgb+oVndjuvw1x24NKsTa3w0BxkWwHh6+BkNqSevX/ewu1M Q4tI2qEB6SZty7kvgjkQahoi8EwVBXL6jIRUXjUdyjhkmAXi6tXW1Y+iXdftvFkcHxEH iAWKed2tvzNaJhlvLKvXvMLRLS3FN9Y9snDJKcz86TtX7beE4xKlEka7rX7SkJR6cY8T 6bY2SkJubZOL4Alri7uNTeaiU27RAkNjLyHL8TMqmloiswjinn9fsSZ7woPZ+s8WnLh0 wHxXHm5YsD5uwyZkWYUKMFmcmmZVqXGvnQlJWw7Lbg318P772EsHga4ouv698U2G26vm jDLw== X-Gm-Message-State: AO0yUKWeL3onEnpPsMaeOLYitGQ3m4CK1hWTcyvn0D9zvTlqvx695b6A LDx1h8Fl8P/KBQTbwZWFFxZ1/g== X-Google-Smtp-Source: AK7set9u/c9N/PMJijGKP+Zpr0ot5AaQHV8qWA9a3nAo7AicpX4fxNmAKcjFCsLT6FrS5IuAAOzmmA== X-Received: by 2002:a05:6a20:2921:b0:c2:f930:45e8 with SMTP id t33-20020a056a20292100b000c2f93045e8mr14110780pzf.46.1680048108936; Tue, 28 Mar 2023 17:01:48 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id d9-20020aa78e49000000b005cd81a74821sm17884448pfr.152.2023.03.28.17.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 17:01:47 -0700 (PDT) Date: Tue, 28 Mar 2023 17:01:47 -0700 (PDT) X-Google-Original-Date: Tue, 28 Mar 2023 17:01:45 PDT (-0700) Subject: Re: [PATCH v2 0/3] RISC-V: ifunced memcpy using new kernel hwprobe interface In-Reply-To: <60617016-c652-72b6-6d68-3d0efce74d74@linaro.org> CC: Evan Green , libc-alpha@sourceware.org, slewis@rivosinc.com, Vineet Gupta From: Palmer Dabbelt To: adhemerval.zanella@linaro.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 28 Mar 2023 16:41:10 PDT (-0700), adhemerval.zanella@linaro.org wrote: > > > On 28/03/23 19:54, Palmer Dabbelt wrote: >> On Tue, 21 Feb 2023 11:15:34 PST (-0800), Evan Green wrote: >>> >>> This series illustrates the use of a proposed Linux syscall that >>> enumerates architectural information about the RISC-V cores the system >>> is running on. In this series we expose a small wrapper function around >>> the syscall. An ifunc selector for memcpy queries it to see if unaligned >>> access is "fast" on this hardware. If it is, it selects a newly provided >>> implementation of memcpy that doesn't work hard at aligning the src and >>> destination buffers. >>> >>> This is somewhat of a proof of concept for the syscall itself, but I do >>> find that in my goofy memcpy test [1], the unaligned memcpy performed at >>> least as well as the generic C version. This is however on Qemu on an M1 >>> mac, so not a test of any real hardware (more a smoke test that the >>> implementation isn't silly). >> >> QEMU isn't a good enough benchmark to justify a new memcpy routine in glibc.  Evan has a D1, which does support misaligned access and runs some simple benchmarks faster.  There's also been some minor changes to the Linux side of things that warrant a v3 anyway, so he'll just post some benchmarks on HW along with that. >> >> Aside from those comments, >> >> Reviewed-by: Palmer Dabbelt >> >> There's a lot more stuff to probe for, but I think we've got enough of a proof of concept for the hwprobe stuff that we can move forward with the core interface bits in Linux/glibc and then unleash the chaos... >> >> Unless anyone else has comments? > > Until riscv_hwprobe is not on Linus tree as official Linux ABI this patchset > can not be installed. We failed to enforce it on some occasion (like Intel > CET) and it turned out a complete mess after some years... Sorry if that wasn't clear, I was asking if there were any more comments from the glibc side of things before merging the Linux code.