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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE06DC76196 for ; Tue, 11 Apr 2023 14:07:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229654AbjDKOHL (ORCPT ); Tue, 11 Apr 2023 10:07:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjDKOHK (ORCPT ); Tue, 11 Apr 2023 10:07:10 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 956C419C; Tue, 11 Apr 2023 07:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1681222029; x=1712758029; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=iwXMraFk3rEELAWbRtbHrkEz6gUhWBvUZKer76tBfNQ=; b=hxYyfBK6gnN44LuVjpjcWE7/3btCqyNo88aYI+IpCLVnsvqUu4EbUp2t yYuL4hl9BTGH0BK5Yf6zRASqf/L+ZD6y/R83M832ZKoBTX2JK2cQTXb6X dOobPUMoWKpzVmUQoYHuuyanZx4NkTAMvZGvYybjxMSmuiGcj6pL3KkgS +FaZtM5dnC+lVC5Kl0MY3c0A91RqVapqcu0b1VNlGs6mixiNFUo/iZ8vl HWLF9We7FCrSQ4OSoGEf7gHCns3JB5WY0ToKI4jIELPmBq5p1odsKNi/Y 6Mc2byM2id37epODVcON8yCqJPfXAlVfWDxC4nwmnyMZnpJCQu/zbdOIz g==; X-IronPort-AV: E=Sophos;i="5.98,336,1673938800"; d="asc'?scan'208";a="220369799" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Apr 2023 07:07:08 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 11 Apr 2023 07:07:08 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Tue, 11 Apr 2023 07:07:04 -0700 Date: Tue, 11 Apr 2023 15:06:49 +0100 From: Conor Dooley To: Evan Green CC: Palmer Dabbelt , , , Conor Dooley , , Heiko Stuebner , Albert Ou , Andrew Bresticker , Andrew Jones , Atish Patra , Celeste Liu , Guo Ren , Jisheng Zhang , Jonathan Corbet , Ley Foon Tan , Palmer Dabbelt , Paul Walmsley , Philipp Tomsich , Samuel Holland , Sunil V L , , , Subject: Re: [PATCH v6 4/6] RISC-V: hwprobe: Support probing of misaligned access performance Message-ID: <20230411-prefix-rename-71ab4af0324a@wendy> References: <20230407231103.2622178-1-evan@rivosinc.com> <20230407231103.2622178-5-evan@rivosinc.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YDuEwp07zFXzbIC1" Content-Disposition: inline In-Reply-To: <20230407231103.2622178-5-evan@rivosinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org --YDuEwp07zFXzbIC1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 07, 2023 at 04:11:01PM -0700, Evan Green wrote: > This allows userspace to select various routines to use based on the > performance of misaligned access on the target hardware. >=20 > Rather than adding DT bindings, this change taps into the alternatives > mechanism used to probe CPU errata. Add a new function pointer alongside > the vendor-specific errata_patch_func() that probes for desirable errata > (otherwise known as "features"). Unlike the errata_patch_func(), this > function is called on each CPU as it comes up, so it can save > feature information per-CPU. >=20 > The T-head C906 has fast unaligned access, both as defined by GCC [1], > and in performing a basic benchmark, which determined that byte copies > are >50% slower than a misaligned word copy of the same data size (source > for this test at [2]): >=20 > bytecopy size f000 count 50000 offset 0 took 31664899 us > wordcopy size f000 count 50000 offset 0 took 5180919 us > wordcopy size f000 count 50000 offset 1 took 13416949 us >=20 > [1] https://github.com/gcc-mirror/gcc/blob/master/gcc/config/riscv/riscv.= cc#L353 > [2] https://pastebin.com/EPXvDHSW >=20 > Co-developed-by: Palmer Dabbelt > Signed-off-by: Palmer Dabbelt > Signed-off-by: Evan Green > Reviewed-by: Heiko Stuebner > Tested-by: Heiko Stuebner I think I had given you an R-b a few versions back, guess it was dropped due to changes or w/e :) Reviewed-by: Conor Dooley Perhaps at some point the "errata" naming of those files should change, but today is not that day. Cheers, Conor. --YDuEwp07zFXzbIC1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZDVpeQAKCRB4tDGHoIJi 0t7jAQDMNiwdcIYzMff2OO0oRagi00n+9SjD1CMom7IerxVzoQD8DNnuZQ82JyZU KaysKejn3MqblyvB0zU+J9PRFOQyJA8= =Skce -----END PGP SIGNATURE----- --YDuEwp07zFXzbIC1--