Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1583431pxj; Sat, 15 May 2021 21:02:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6R8f7iUARqDQJ9bSvH9zAgkhBiJESBIoLwu1FQoDzuPLjQqABZjWxBS6mm4idbQwnT/ts X-Received: by 2002:aa7:cd90:: with SMTP id x16mr63825753edv.182.1621137751297; Sat, 15 May 2021 21:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621137751; cv=none; d=google.com; s=arc-20160816; b=hFeC8AEtSDYYRchFJq3iK+WqUrPMNEodXs1Tb0ztrba2K0734+v6sS0r7iUqWv12Fr gyTpxVV2KhO3hwiftYkqJwHFbNlftjVTAdAx0WzoJGgaZIBuNpMG6Jg9pQAHW5yRZpiL U6MXKtgYJfSycQnqN3ny/uUH3wHYXoqv1qPfbJh8JD8pPK8zQwoZE+cbU1kxpYa7dXVA +AwdiLwwuTHAt8l2HTH/7qV9N+o3MAIU+JdbPG3V6BWhA3k2x8gR8paMCFnkt7MUWb+/ XRZmWwlGBxvcj5Fb1tqkedJ/Vc9de81SX+pkc79rhP+JNr6gCrFpbdMEMR+CMKqxXIwl uQLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=EL8bF37yOg9/vjkA4x/1EwZmZ+fRqooXXTh+JgjMgIA=; b=eN0BI7ELQHF9j/3CDCsEEjS/2ZPkws1M6OQxO0RNRhl/rSjGqG1ulEkPXS53gwf4SB R6AxOBlYofiYhojYdxHLpfR0tCWn9UJQWekxfIYrxReRGn2CtEcQtOcG2sUPTGjjU2lW dBlOQ7NyhUGEKUZJYFYglRR9dBBhSoln3dIo0d/Cy/4sEKUxKPnkGQQF04HVDlKq5PWn guFkYo0jyaK5S3PY76USwWqgqe1NbAKKjHRArIDErr2DrQAGlYcRYcLH2OinP5MgENuA +7kLw8OlDy0M1d/mbkbReflH24KSSoVn167IMYUmuc0jA3FqQIE9pzRsOcwDQL5OAn30 Ttug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 17si9984055edv.148.2021.05.15.21.01.39; Sat, 15 May 2021 21:02:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232796AbhEOPiL (ORCPT + 99 others); Sat, 15 May 2021 11:38:11 -0400 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:37731 "EHLO outpost1.zedat.fu-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232773AbhEOPiK (ORCPT ); Sat, 15 May 2021 11:38:10 -0400 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.94) with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1lhwLX-0015oL-08; Sat, 15 May 2021 17:36:55 +0200 Received: from pd9f74b7b.dip0.t-ipconnect.de ([217.247.75.123] helo=[192.168.178.23]) by inpost2.zedat.fu-berlin.de (Exim 4.94) with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (envelope-from ) id 1lhwLW-001yNF-PF; Sat, 15 May 2021 17:36:54 +0200 Subject: Re: [PATCH v2 03/13] sh: remove unaligned access for sh4a To: Arnd Bergmann Cc: linux-arch , Linus Torvalds , Vineet Gupta , Yoshinori Sato , Rich Felker , Linux-sh list , Linux Kernel Mailing List References: <20210514100106.3404011-1-arnd@kernel.org> <20210514100106.3404011-4-arnd@kernel.org> <3d70eb2a-2969-197e-63e8-f3e0a6a8ddd8@physik.fu-berlin.de> From: John Paul Adrian Glaubitz Message-ID: <71b5d15d-7bd2-aa08-cc0a-3caccf9c66c8@physik.fu-berlin.de> Date: Sat, 15 May 2021 17:36:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 217.247.75.123 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd! On 5/14/21 2:22 PM, Arnd Bergmann wrote: >> My Renesas SH4-Boards actually run an sh4a-Kernel, not an sh4-Kernel: >> >> root@tirpitz:~> uname -a >> Linux tirpitz 5.11.0-rc4-00012-g10c03c5bf422 #161 PREEMPT Mon Jan 18 21:10:17 CET 2021 sh4a GNU/Linux >> root@tirpitz:~> >> >> So, if this change reduces performance on sh4a, I would rather not merge it. > > It only makes a difference in very specific scenarios in which unaligned > accesses are done in a fast path, e.g. when forwarding network packet > at a high rate on a big-endian kernel (little-endian kernels wouldn't run into > this on IP headers). If you have a use case for this machine on which the > you can show a performance regression, I can add a patch on top to put > the optimized sh4a get_unaligned_le32() back. Dropping this patch > altogether would make the series much more complex because most of > the associated code gets removed in the end. Hmm, okay. But why does code which sits below arch/sh have to be removed anyway? I don't fully understand why it poses any maintenance burden/ > As I mentioned, supporting "movua" in the compiler likely has a much > larger impact on performance, as it would also help in user space, and > it should improve the networking case on little-endian kernels by replacing > the four separate byte loads/shift pairs with a movua plus a byteswap. The problem is that - at least in Debian - we use the sh4 baseline while the kernel supports both sh4 and sh4a, so we can't use any of these instructions in userland at the moment. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaubitz@debian.org `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913