From nobody Thu Nov 25 15:31:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 91D4918A9EF0; Thu, 25 Nov 2021 15:31:17 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (hmo.in-vpn.de [IPv6:2001:67c:1407:60::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "nuc.oldach.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0MKb5x5fz4VWL; Thu, 25 Nov 2021 15:31:15 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.17.1/8.17.1/hmo17dec20) with ESMTPS id 1APFVB3K039511 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 25 Nov 2021 16:31:11 +0100 (CET) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.17.1/8.17.1/Submit) id 1APFVBK9039510; Thu, 25 Nov 2021 16:31:11 +0100 (CET) (envelope-from freebsd@oldach.net) Message-Id: <202111251531.1APFVBK9039510@nuc.oldach.net> Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features In-Reply-To: <1a76eb2e-b9f0-946e-c80b-e6bc9e258d59@freebsd.org> from Allan Jude at "25 Nov 2021 10:09:25" To: allanjude@freebsd.org (Allan Jude) Date: Thu, 25 Nov 2021 16:31:10 +0100 (CET) Cc: manu@bidouilliste.com, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: freebsd@oldach.net (Helge Oldach) X-No-Archive: Yes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: inspected by milter-greylist-4.6.4 (nuc.oldach.net [0.0.0.0]); Thu, 25 Nov 2021 16:31:11 +0100 (CET) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Rspamd-Queue-Id: 4J0MKb5x5fz4VWL X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@oldach.net designates 2001:67c:1407:60::1 as permitted sender) smtp.mailfrom=freebsd@oldach.net X-Spamd-Result: default: False [-3.30 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[oldach.net]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.997]; FROM_NO_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N Allan Jude wrote on Thu, 25 Nov 2021 16:09:25 +0100 (CET): > On 11/25/2021 2:38 AM, Helge Oldach wrote: > > hmo@p48 ~ $ for f in 0 1 2 3 8 16 32 64 128 ; do echo -n $f:; env OPENSSL_armcap=$f openssl speed -evp aes-256-gcm 2>&1 | tail -1 | cut -wf7; done > > 0:42295.15k > > 1:23891.19k > > 2:42208.57k > > 3:23970.56k > > 8:42354.98k > > 16:42199.06k > > 32:size > > Illegal instruction (core dumped) > > 64:42322.42k > > 128:42275.00k > > hmo@p48 ~ $ > > > > So I guess HWCAP_FP is the culprit? Maybe related to hard/soft floating > > point math which indeed is kind of special on the Pi? > > So yeah, the issue seems to be that floating point on the RPi4 is slower > than not, but now openssl (properly) detects that the CPU advertises > support for it. > > As seen elsewhere in the thread, most other ARM platforms get a very > significant speed boost. So can we disable FP within OpenSSL for the RPi by default? This commit basically introduced a regression for this platform and I think that should be fixed. Or it the root cause a suboptimal FP implementation that is not adequate for the RPi? Kind regards Helge