Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp889717ybl; Thu, 12 Dec 2019 06:32:00 -0800 (PST) X-Google-Smtp-Source: APXvYqxS6pTmEH66j1IueYQCBODqe2VhsFqPkRbE7p/zp91PkF3g4a4oKADSlWS2SXJHQQ4lpxOI X-Received: by 2002:a05:6830:1116:: with SMTP id w22mr8642090otq.63.1576161120659; Thu, 12 Dec 2019 06:32:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576161120; cv=none; d=google.com; s=arc-20160816; b=uEMiCouf+yHKanj7rRqN5HVtqR2u52pPfd+7ktbn5VkytDRdB8kxyvEzzc20Eaue45 E5SHY1EXmH1ZILpqRArS1ZyDx0GM7rrojnYLgs2iBXYMHBbPaG4TquBh5j8MX5jZ7PUg SUx+2TehaNdgIGksupT/rpM6U4c3rGbn/qyhNNw6aKmYIQ6iGHRKacnDXk1dHAZT3JYv 4N5gNUNTu+FJv7hDRqfkuIq1dEmZ0YeurvZ3qGmtkwoD0ldsus/Mxxuj9vi2xpiFFPCX oqfsOZmIe1IeZB2lm75ZOamNvGThNUTkv5Eth3za2HjZLh5MMjVilgjlO1+Nh4ClL+Uk katA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=L0t4p5NyQSvJ20O/Pw45OkjcWmRZe78l2w7pVO5bJ1Q=; b=b6ZV5FQqEDQZEjNKGxNgkZds/lHHd4svY7nu2LoX7Xgplv0WBbTzo/vPRdMuiGWytd QrsEGNZfbf/Rk8EkpzIN+1vriFZpYCPhX0WHuUyTobVJfw8ciWXeMlY5Ct73Ag7MK7x0 XqVjSI6TLteCW1rIA3JrkcmYtO2vDnW+2wDfVnsz1b3aC03d6ct31xFVWQ6lNH9C5dBj C2Oczjo+MtseW1QC8qm+oLDpVOiUyyMK5GftfBlpY5MtV/yvAkpZ1LsqzZdELjR0+4qC /BYE6KHVd4eeF0piWLNm82W7y6U+qmER6GposriGLIYN5y9oF4YQyVtKEVw+8SiqYT2j a7aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=rUIj2xwk; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g190si3133707oib.106.2019.12.12.06.31.48; Thu, 12 Dec 2019 06:32:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=rUIj2xwk; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729752AbfLLOaz (ORCPT + 99 others); Thu, 12 Dec 2019 09:30:55 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:52105 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729612AbfLLOay (ORCPT ); Thu, 12 Dec 2019 09:30:54 -0500 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 0002d49a for ; Thu, 12 Dec 2019 13:35:05 +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=iehgp+nXsGk8SuvtzvDstSbnKtM=; b=rUIj2x wknQfs5R5cqVVmb2UhBpfGLJRSZ+hxkHE/g1dIP8pji1XnNGPPmc9d7QdrQufNL5 m4hvy36eDN43zYvujBWE8zpgSFiZ7axVOKSGnX2X3HU7edpipeijYRX7T+oKkWq4 z3sEMiu8E04aqCPA0MKzFFrKwQtWBUjBSB+EerVlc2veS1PqXkE4jYDANEjYHCaH 1IAPWkE4OKVLpia6lLHf+NuqfTX1MtaYh/mTalHiPuIL0hMCqahZtpo61Nwt0A4+ 6h6kYjgXEkegTrunIEIiNPqh7XipXM2au7iVHO07ZKxmzkWFeLBv9cYrmzw42cyN 5vsywf/1Y7NaePPg== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 41d5348e (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Thu, 12 Dec 2019 13:35:04 +0000 (UTC) Received: by mail-oi1-f170.google.com with SMTP id a124so540707oii.13 for ; Thu, 12 Dec 2019 06:30:52 -0800 (PST) X-Gm-Message-State: APjAAAXsuBVpp6Zbqqdlk9A51QL7b2xgiwGYF6P3FMfpXZKuNtzDCPDM 41XALau9H4XEpv+8ktVdaPh05IGBlD3GdYK39LQ= X-Received: by 2002:aca:5143:: with SMTP id f64mr4942382oib.66.1576161051500; Thu, 12 Dec 2019 06:30:51 -0800 (PST) MIME-Version: 1.0 References: <20191211170936.385572-1-Jason@zx2c4.com> <20191212093008.217086-1-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Thu, 12 Dec 2019 15:30:39 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH crypto-next v2 1/3] crypto: poly1305 - add new 32 and 64-bit generic versions To: Ard Biesheuvel Cc: Martin Willi , Linux Crypto Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Dec 12, 2019 at 3:26 PM Ard Biesheuvel wrote: > > On Thu, 12 Dec 2019 at 14:47, Jason A. Donenfeld wrote: > > > > On Thu, Dec 12, 2019 at 2:08 PM Jason A. Donenfeld wrote: > > > > > > Hi Martin, > > > > > > On Thu, Dec 12, 2019 at 1:03 PM Martin Willi wrote: > > > > Can you provide some numbers to testify that? In my tests, the 32-bit > > > > version gives me exact the same results. > > > > > > On 32-bit, if you only call update() once, then the results are the > > > same. However, as soon as you call it more than once, this new version > > > has increasing gains. Other than that, they should behave pretty much > > > identically. > > > > Oh, you asked for numbers. I just fired up an Armada 370/XP and am > > seeing a 8% increase in performance on calls to the update function. > > It would help if we could get some actual numbers. I usually try to > capture the performance delta for a small set of block sizes that are > significant for the use case at hand, e.g., like so [0], and also > include blocksizes that are not 2^n. If the change improves the > general case without causing any significant regressions elsewhere, I > don't think we need to continue this debate. I'm not sure I understand why the 32x32 performance discussion is even happening in the first place. The new 32x32 code most certainly doesn't make anything worse. It most likely makes some things better in some places -- 8% on that machine I fired up, maybe more and maybe less other places. But who even cares? The principle advantage of this patchset is the 64x64 code, and I think we gain something else, immeasurable, by having parallel and comparable implementations. Please, let's not turn this into another pointless debate.