Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp931207pxu; Wed, 16 Dec 2020 19:55:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZgFeiqy8XRWggXgcJFrgTegp/sbuqoSC3S2DxVP2PgiyXB9zfYIcDzEgjs0lfuuLiGF5I X-Received: by 2002:a17:906:ae55:: with SMTP id lf21mr13491417ejb.101.1608177325731; Wed, 16 Dec 2020 19:55:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608177325; cv=none; d=google.com; s=arc-20160816; b=nrF9dFCBtjj9acYx5eEM1gGNwux6b52iVbfwpfTXdR0NyxdYWVHHXaDVC0z/X95Srl ffLo1x/sk9RG8UDg6CzDwVSE80oSj1Xb3ID6C8HDKgMD9w1UuOUvso5AVI7n1ZaJ9uHd Zhf0v0rZogKSJrI2tsO3dj8f7ssdYw8ISQdZEEVyWmxgSlCz1QsANCHdngqpcBlTaXw0 nRSpm3Q3z/Z1o3vvoeh24ZAYzKJ4pc0H4lPnSbxP7mTjDYOC9WkgDAyl0My8bEHbnQ3o gIqIZMeW0qz3HZ+hPTUD1UTmkRmUszsyltUvrV3p+UetK1w+tEUYAJjL4wloMvc5tB0L 6teA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=8zEn8hRnaB4bephslZ0/LI9dBvW9/oKTTXTIExY6uiM=; b=CfqG0aMpKgKiONL72srOLIrCNTbQIy6kxEyFPJ+1PXm8iH/odQA0IjN7XOeNMiA2o8 8m4clk4xD5HAC2bA261ZcTLfLiffZPtGfVm29vhuKH+3di8cX7Dp3kXDGEqcKJW0uNfA Q8RPGoL1ReAjzr+3t64iwcN2iJDScmnc2xuSZs9TzbY5qMJo4IKNtzXK0UuDfCsztwO6 N76TWBR9ARB+PHtx5KznPmFM4h5RTff900DkGaivBqE2G/nKt8HLPpISZMUnMGMoSHUG xWgUs0V6/ircb6k2INOFGyIRkQveIAkyni8FgBfVe8znT37jLta9lUoRYUq9aCtPcvAV /ZEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="R/WW+BLH"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si1869306ejo.619.2020.12.16.19.55.03; Wed, 16 Dec 2020 19:55:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="R/WW+BLH"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727422AbgLQDzC (ORCPT + 99 others); Wed, 16 Dec 2020 22:55:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:56070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727165AbgLQDzB (ORCPT ); Wed, 16 Dec 2020 22:55:01 -0500 Date: Wed, 16 Dec 2020 19:54:18 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608177260; bh=1O3+t+XhP6op9L25LamvDqxeBTZ3JIMb0o2j1ie7P3s=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=R/WW+BLH4OwB0bUELDV1QMDxxL5Lx1mu/EIf37/GcG12HXa6T93ZNN2L7Y8sfxYgO 3YemQZ58uJc2g7UroqzYaEyGfeR9L2eSMHLMg4swo2ZQumoJ7J7UrZPqdjwdZaqbYJ kUAv62phC/Kwlv3yPJu0Vnd8GWDEW4KYza4ipvWwRG35AMW6VyVyWvrSMF9mMA+/YR TTBAxeOo9VEOSGfuwRyFoJTIn4Vrrxk3uWyP337lLms8d+87bMOgubej54kBGk7zvn x7BKOzu4xPgqXkZIqi4wm8bL0j/PzuMOfguAFgbn8Uy2qNYqgTRU5mS/ay321oMdMH xZw9Cs2hbusuw== From: Eric Biggers To: "Jason A. Donenfeld" Cc: Linux Crypto Mailing List , linux-arm-kernel , Ard Biesheuvel , Herbert Xu , David Sterba , Paul Crowley Subject: Re: [PATCH 0/5] crypto: add NEON-optimized BLAKE2b Message-ID: References: <20201215234708.105527-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Dec 16, 2020 at 11:32:44PM +0100, Jason A. Donenfeld wrote: > Hi Eric, > > On Wed, Dec 16, 2020 at 9:48 PM Eric Biggers wrote: > > By the way, if people are interested in having my ARM scalar implementation of > > BLAKE2s in the kernel too, I can send a patchset for that too. It just ended up > > being slower than BLAKE2b and SHA-1, so it wasn't as good for the use case > > mentioned above. If it were to be added as "blake2s-256-arm", we'd have: > > I'd certainly be interested in this. Any rough idea how it performs > for pretty small messages compared to the generic implementation? > 100-140 byte ranges? Is the speedup about the same as for longer > messages because this doesn't parallelize across multiple blocks? > It does one block at a time, and there isn't much overhead, so yes the speedup on short messages should be about the same as on long messages. I did a couple quick userspace benchmarks and got (still on Cortex-A7): 100-byte messages: BLAKE2s ARM: 28.9 cpb BLAKE2s generic: 42.4 cpb 140-byte messages: BLAKE2s ARM: 29.5 cpb BLAKE2s generic: 44.0 cpb The results in the kernel may differ a bit, but probably not by much. - Eric