From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 096023857830 for ; Wed, 14 Feb 2024 15:16:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 096023857830 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 096023857830 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::432 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707923796; cv=none; b=QG76Dtmy/Dc08AmBPrf6KdHRGDPblaCUH+PufdEHV/MhRw8qfBz8hx7Wc2IhbdFGSEsD3Klvhjtm4SsvcP9DoV49mgaYK29ZP6sFVdMKvUqOOhllSaLUlWsi4/oVWhZoA18DqKjgSRpuAyf94ORCYDSoHm2ZvUcJA8xbotAWTkA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707923796; c=relaxed/simple; bh=5JbMGTEJZJFopqDD4Lwg4YGQ9CkB19fImhTAuenWaE0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=M6bCtTJNqBFebHd43rERyT3HuokOJJ8JlM2alENMCZQI6/9vVIEDeXJczVkTd0WNaBKvvV4ckj8DbuJJxwg/UaVer6vaIj+C57a/uA2xwzOc8CYWPktg94Tw9gez3Aagz0fNBLrfTvi0l7e0LKnoUfvmx1nsYBN+HlTMk/yoJTY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6e08dd0c7eeso1484362b3a.1 for ; Wed, 14 Feb 2024 07:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707923794; x=1708528594; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=uyb/+YgzrXFDgzAp9XJgbbt+qPEFNSru2lny+Ztf9L8=; b=VZfTIj1XJm0io5HP/iIDr0aLu2IZXTiTuU2W39LsHoJUQ0W3jtEMwFuU5Io1n1bjhv E3GpGu4ceuftbLOYKwFeglruQeGR272h51JA9fKBFF1n+E1nfghtUNU81gxwhuiqAD2g S/U5lRqmDT1nZHVz9+V2w49GrGsvjAXERW8yJhrt+AXkr33halhSHzIoqvWcL31vKO/v 2UVgQssZ2jYF0VK3u2Hbofz2IJ1uK0RNXMW3S0AiW8kyvrdou5cx1ieSy5fXom0rzotF qYNAVmd6Z8P0lunwL0nPbacbSYgBDEa1cdqMdnpzd0TjKzc2EWSbi6lcHVwxBXY4g8/E t/Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707923794; x=1708528594; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uyb/+YgzrXFDgzAp9XJgbbt+qPEFNSru2lny+Ztf9L8=; b=X9nVdeLarjeuPKr3VbV95C32GXpu1mCjQ7Z+9MloNGgPSselQ2FQGV4jkCybS6tVaO 60n41CemAPsZ6R8pyjEoA4RtSzrXXP3QVuZqzz7c1i7DWWhth7LYkTHMVda/O7wH0BZD 3kqlJTSl8IHUxEOjqf+gFLWn8yrJejjIzvxMws8ozOKgRyAqrtJwvxp2yeT/0qrh5d7+ wpVmnYJu+B1N7HYEULF/1lkYq3z5g5sIfACFfwQXxXrrNO+aTUZ/2woWRKDlVJlqdhYl hcvIkWOA1+gf3UqIRACm6i+a1rRURH/Qzx0HOzzy5zvWajzbiEmHZ7Diwg4FiDrIn6nL /sLA== X-Forwarded-Encrypted: i=1; AJvYcCVGpI7KR3hrjQkEWONELk3sVdMFl7HAT68BXXy3Kd/ym8/Dq4rzj30z3mhEqXN5fSpBJUmeavAFCLI6KLlLZv9SDGvWpegmCHNl X-Gm-Message-State: AOJu0YyTM+CY/kyMjvx0DLeP7k1f6RRvCDc6IybJY5Va2+KBn96eGUwu 4WpafcOE1tXszxl9gH0KH7gAILcf3iNsUfga34S6j+6QE/7l6W/obTjzoiOOH40= X-Google-Smtp-Source: AGHT+IGSlMMJbcHqfIGuj2K6JyQZR5A4fIpGKkkL1GjVftY9mPPYX5VKaQJZt9/w0OLdDicR4OlTZQ== X-Received: by 2002:a05:6a20:6f90:b0:19e:5110:be0 with SMTP id gv16-20020a056a206f9000b0019e51100be0mr3145080pzb.54.1707923794008; Wed, 14 Feb 2024 07:16:34 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVWdCzK/0QXpgqQPBqiZJuheTeyVd2rtw6OuCeeDKtwFgl2d6CFjfttJiHHLVH/P/kBEDL5KQjRQ2shgLNFmSJLXZ3nf53r1rXqxi/oQYG6KH1u+yp/B92tHySkNNoaeCxU8Kv+qySgQ8I7WLJSdfSNbd4LXAxoeZiG89a8u+CvlM1iAb9o8SEXa+sJNxP4BS7vtaYxfJKk5dTo Received: from ?IPV6:2804:1b3:a7c0:8177:d08d:6747:e5f5:d1e5? ([2804:1b3:a7c0:8177:d08d:6747:e5f5:d1e5]) by smtp.gmail.com with ESMTPSA id it18-20020a056a00459200b006e118d2db93sm274750pfb.125.2024.02.14.07.16.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Feb 2024 07:16:33 -0800 (PST) Message-ID: Date: Wed, 14 Feb 2024 12:16:30 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v12 0/7] RISC-V: ifunced memcpy using new kernel hwprobe interface Content-Language: en-US To: Evan Green , libc-alpha@sourceware.org Cc: vineetg@rivosinc.com, Florian Weimer , slewis@rivosinc.com, palmer@rivosinc.com, Jessica Clarke References: <20240214143159.2951158-1-evan@rivosinc.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20240214143159.2951158-1-evan@rivosinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 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,TXREP,T_SCC_BODY_TEXT_LINE 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 14/02/24 11:31, Evan Green wrote: > > This series illustrates the use of a recently accepted 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. > > For applications and libraries outside of glibc that want to use > __riscv_hwprobe() in ifunc selectors, this series also sends a pointer > to the riscv_hwprobe() function in as the second argument to ifunc > selectors. A new inline convenience function can help application and > library callers to check for validity and quickly probe a single key. I still think we should address Jessica Clarke remarks for the ifunc ABI [1]. I recall that Florian has tried to address the ifunc ordering and that Jessica proposed solutions was not fully sufficient to address all the ifunc corner cases. [1] https://sourceware.org/pipermail/libc-alpha/2024-January/154082.html