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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F126BC4361B for ; Thu, 17 Dec 2020 14:02:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABC6F2395A for ; Thu, 17 Dec 2020 14:02:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726012AbgLQOCS (ORCPT ); Thu, 17 Dec 2020 09:02:18 -0500 Received: from mail.zx2c4.com ([192.95.5.64]:58563 "EHLO mail.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbgLQOCR (ORCPT ); Thu, 17 Dec 2020 09:02:17 -0500 Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 3878ca99 for ; Thu, 17 Dec 2020 13:53:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=0aw5hLqJR4v9VhWFOub3GvFpNw0=; b=KJKWdb LzN6FZAbjB8oj/u23Spa78T+5S3Ihi1iR5na3l0T9PDYE8BFuOsYp04y8e97tcsN kPJQUpd9nr90VRPuKDFCyNkIG1dNOyrTBH+qeGvc28T2Ht5EJ29r20EvxxtkITac cQC3TbN/ABWh4EGxre3PzqZVFKnhMzCd5i+pYG0PWtYwp230yXiIqJr2bj0R6xz5 CNuqLOCYvywklg6J1yONVtjpIte4tOXdsRrsPx98JcxqrnHJO/XxuVCntsM9/2QK /Hs+4f34TTckROLhc2eX2UW/RkH9RlM8Xf/KJGEUVTOlIgucuKqnOOFP0H6qqheN fw/EhWZrFkrHLLOg== Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 96102038 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Thu, 17 Dec 2020 13:53:50 +0000 (UTC) Received: by mail-yb1-f178.google.com with SMTP id d37so1488481ybi.4 for ; Thu, 17 Dec 2020 06:01:35 -0800 (PST) X-Gm-Message-State: AOAM531o4wNZwb/4btKXEBMbsRZjA6RYQ2FpWz74N4r6GnvZajs0M0dd uk125L1Lb1DdZrNcG5GsQ5uEpvt9LBAmlqadNzU= X-Google-Smtp-Source: ABdhPJz4wQxBSA3ZCgR3XksY5Kd8n7xxVwzeQhw60kUbwdUENg6+9sEbepfMN/wneWWko81mTF+PoDShJBbIVn6MPog= X-Received: by 2002:a25:4744:: with SMTP id u65mr61913760yba.239.1608213695207; Thu, 17 Dec 2020 06:01:35 -0800 (PST) MIME-Version: 1.0 References: <20201215234708.105527-1-ebiggers@kernel.org> In-Reply-To: From: "Jason A. Donenfeld" Date: Thu, 17 Dec 2020 15:01:24 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/5] crypto: add NEON-optimized BLAKE2b To: Eric Biggers Cc: Linux Crypto Mailing List , linux-arm-kernel , Ard Biesheuvel , Herbert Xu , David Sterba , Paul Crowley Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Dec 17, 2020 at 4:54 AM Eric Biggers wrote: > > 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. That's certainly a nice improvement though, and I'd very much welcome the faster implementation. Jason 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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 144E5C4361B for ; Thu, 17 Dec 2020 14:03:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B1CB92360D for ; Thu, 17 Dec 2020 14:03:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1CB92360D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=zx2c4.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VV9I96t0Q8RE3ndKvQWitmmvEcP8R5QkImsesedEeDE=; b=b1D/J5YbxGv+FZHth12bu9nqA BJwhjEmmrtRK+tLU4aoVJfdzFIxtJsShggWbsg+2nBWvvh2ogdT1otWQR0dZGcBIEroc4lsikIoym k8drGO7NdKdjtwdndl2pBoZAEALG/OlDKS22oCri9XlpQK3EjxpoPPEs6uMbqzdRif+lEuxQXGXJn VVRANtj6SY3hq/xaqHKl84L5pMmfyyzNByJapmA0vQQIP5HvbQ77f/QU0z47sbIReCRBGaRJc62Ap bVD97AZkjr2clndb+SGE65G4gXshvE5Vj9xUskzYx5Rv4i/quHN7xZaY48PnNw5thS8QP8EHAZPdU SSrCZ2Pxg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kptqh-0003Qr-Ml; Thu, 17 Dec 2020 14:01:43 +0000 Received: from mail.zx2c4.com ([192.95.5.64]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kptqe-0003QU-PA for linux-arm-kernel@lists.infradead.org; Thu, 17 Dec 2020 14:01:41 +0000 Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTP id e038a1a2 for ; Thu, 17 Dec 2020 13:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=0aw5hLqJR4v9VhWFOub3GvFpNw0=; b=KJKWdb LzN6FZAbjB8oj/u23Spa78T+5S3Ihi1iR5na3l0T9PDYE8BFuOsYp04y8e97tcsN kPJQUpd9nr90VRPuKDFCyNkIG1dNOyrTBH+qeGvc28T2Ht5EJ29r20EvxxtkITac cQC3TbN/ABWh4EGxre3PzqZVFKnhMzCd5i+pYG0PWtYwp230yXiIqJr2bj0R6xz5 CNuqLOCYvywklg6J1yONVtjpIte4tOXdsRrsPx98JcxqrnHJO/XxuVCntsM9/2QK /Hs+4f34TTckROLhc2eX2UW/RkH9RlM8Xf/KJGEUVTOlIgucuKqnOOFP0H6qqheN fw/EhWZrFkrHLLOg== Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id edf36180 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Thu, 17 Dec 2020 13:53:50 +0000 (UTC) Received: by mail-yb1-f177.google.com with SMTP id x2so25905694ybt.11 for ; Thu, 17 Dec 2020 06:01:35 -0800 (PST) X-Gm-Message-State: AOAM533DXeD2stF0SrkTT0hxAASSgIMYP+AIO01lLYoOlInQ4nsYi4+m MheCriiBDXhb+WL4IF6DI4FGt1LCmil3oZxArqA= X-Google-Smtp-Source: ABdhPJz4wQxBSA3ZCgR3XksY5Kd8n7xxVwzeQhw60kUbwdUENg6+9sEbepfMN/wneWWko81mTF+PoDShJBbIVn6MPog= X-Received: by 2002:a25:4744:: with SMTP id u65mr61913760yba.239.1608213695207; Thu, 17 Dec 2020 06:01:35 -0800 (PST) MIME-Version: 1.0 References: <20201215234708.105527-1-ebiggers@kernel.org> In-Reply-To: From: "Jason A. Donenfeld" Date: Thu, 17 Dec 2020 15:01:24 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/5] crypto: add NEON-optimized BLAKE2b To: Eric Biggers X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201217_090140_879777_B1CBD05A X-CRM114-Status: GOOD ( 21.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Herbert Xu , Linux Crypto Mailing List , David Sterba , Ard Biesheuvel , linux-arm-kernel , Paul Crowley Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Dec 17, 2020 at 4:54 AM Eric Biggers wrote: > > 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. That's certainly a nice improvement though, and I'd very much welcome the faster implementation. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel