Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp856958pxb; Sat, 16 Jan 2021 09:20:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzSyaJaLdueCS1iO8cgX+wXUcRoAV5vbgvFV1F+z0jZzdPwROre5J2FQZjJ13AarpND9EuP X-Received: by 2002:a05:6402:1249:: with SMTP id l9mr8655207edw.375.1610817649354; Sat, 16 Jan 2021 09:20:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610817649; cv=none; d=google.com; s=arc-20160816; b=dYbh0iQ/cBkS2TqHinuQyj4ggXa7CHJvHih648gOB0sVavM2YlAhxOqs712Cus+Efu rpnb4AX0GZJqf5P33XzL1jbBbEei+esz7Y4+h+xIom+Era9CibaXWNMUe7oAJxuRz25o lYzNN8GBKnq+j64RlSO0HWB6aoOwpFkpMsMdO+plT8/JBx5gkKn/5/kefPlvEEwc+WZg FsoZh4slZ5rRGpb1ve5OKFLjdIpZJKytqSGMI6QBXA2JP+EsgpXgwSQTQo2H57fEyNNC 7gpxbNYnkfhDVd4G58ZSnnO2SYsK4rXWOJ6w5k8yQbZ/ML0/bjd5DCWXQGOyLHX0IYbL KTAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZDSLu0JCfcOYuE9aL0IgQNet6XaP5vThHRTmm/vzuMc=; b=x36jN1tigZ6jNO0UNsuLsgNPGtWsuy+KVoeKa8Pu5AUgVS4lwJfsssYoSY17bX8DN2 kKw+bMwBd6szeUIOgs6QvvLHb/4Bjfvuw9CZyzsIqXjGjnXHMtAG0Tn94wPUuiLUnzt8 PAuK5PXJRoZvn1wakWCdnEo6sZzBmp3QVdYXD1mG992gPPSEaySe++1dQcwkZtAw5b1h i681H408wYXNOI04A28+jv1MJSSnbxPgXt8WzEGPwpqqEZtP9qcf7iF7eyS6G8izedKv zk76I+DIDxRxXHYqmXCkC5+Je9d8rX5ZL5bTxtP/RRHMT7Q2Vg9lC2lQoI5BkRfbYqNa bB7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="rf6HIma/"; 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 a92si3308615edf.570.2021.01.16.09.20.30; Sat, 16 Jan 2021 09:20:49 -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="rf6HIma/"; 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 S1725964AbhAPRUS (ORCPT + 99 others); Sat, 16 Jan 2021 12:20:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:33406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726957AbhAPRUG (ORCPT ); Sat, 16 Jan 2021 12:20:06 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD2A523359; Sat, 16 Jan 2021 16:52:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610815937; bh=ZDSLu0JCfcOYuE9aL0IgQNet6XaP5vThHRTmm/vzuMc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=rf6HIma/8HBkx/yapd0BlF0jmFJUj48+iYJlgrVuPgqOKC2ngssWuHUaoXHa3DJRI EaIcxw6SV7vbbNuRD88NmNLOXvmCTOVN8lsCgGXktVwj0Z2DXzcHIG28MjOFGs5ZwJ VL7BtgWdvqd0cCWYfMK1YO8R3nSixd9d6enVBsmlrABaLrMS1+SVAwipVRRdBeyZr1 6RSnQkt0l8MMedGRu1VhZfrPqwq/itJ2fAHGggBuFshu3VUvGIhP4YYj3HJZeQdHSP 63d2D4liVug3cRy3fUgResEba3FRhn4rNByj19lYY8JQ02kkp+rQjY5Zbp3FZqbeH2 QUnE8FxSvlwzQ== Received: by mail-ot1-f46.google.com with SMTP id o11so11876075ote.4; Sat, 16 Jan 2021 08:52:16 -0800 (PST) X-Gm-Message-State: AOAM532nM9RrDPryCaRZjEJcl496BmGVwF488cpbYyD1RznF4TZfawBm 56hhYxCYmEpgSMuALSCyJzR052giw4c4H2duPj8= X-Received: by 2002:a05:6830:10d2:: with SMTP id z18mr12528352oto.90.1610815936257; Sat, 16 Jan 2021 08:52:16 -0800 (PST) MIME-Version: 1.0 References: <1608325864-4033-1-git-send-email-megha.dey@intel.com> In-Reply-To: From: Ard Biesheuvel Date: Sat, 16 Jan 2021 17:52:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC V1 0/7] Introduce AVX512 optimized crypto algorithms To: "Dey, Megha" Cc: Eric Biggers , Herbert Xu , "David S. Miller" , Linux Crypto Mailing List , Linux Kernel Mailing List , ravi.v.shankar@intel.com, tim.c.chen@intel.com, andi.kleen@intel.com, Dave Hansen , wajdi.k.feghali@intel.com, greg.b.tucker@intel.com, robert.a.kasten@intel.com, rajendrakumar.chinnaiyan@intel.com, tomasz.kantecki@intel.com, ryan.d.saffores@intel.com, ilya.albrekht@intel.com, kyung.min.park@intel.com, Tony Luck , ira.weiny@intel.com, X86 ML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, 28 Dec 2020 at 20:11, Dey, Megha wrote: > > Hi Eric, > > On 12/21/2020 3:20 PM, Eric Biggers wrote: > > On Fri, Dec 18, 2020 at 01:10:57PM -0800, Megha Dey wrote: > >> Optimize crypto algorithms using VPCLMULQDQ and VAES AVX512 instructions > >> (first implemented on Intel's Icelake client and Xeon CPUs). > >> > >> These algorithms take advantage of the AVX512 registers to keep the CPU > >> busy and increase memory bandwidth utilization. They provide substantial > >> (2-10x) improvements over existing crypto algorithms when update data size > >> is greater than 128 bytes and do not have any significant impact when used > >> on small amounts of data. > >> > >> However, these algorithms may also incur a frequency penalty and cause > >> collateral damage to other workloads running on the same core(co-scheduled > >> threads). These frequency drops are also known as bin drops where 1 bin > >> drop is around 100MHz. With the SpecCPU and ffmpeg benchmark, a 0-1 bin > >> drop(0-100MHz) is observed on Icelake desktop and 0-2 bin drops (0-200Mhz) > >> are observed on the Icelake server. > >> > > Do these new algorithms all pass the self-tests, including the fuzz tests that > > are enabled when CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y? > > I had tested these algorithms with CRYPTO_MANAGER_DISABLE_TESTS=n and > tcrypt, not with > CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y (I wasn't aware this existed, my bad). > I see a couple of errors after enabling it and am working on fixing those. > Hello Megha, I think the GHASH changes can be dropped (as discussed in the other thread), given the lack of a use case. The existing GHASH driver could also be removed in the future, but I don't think it needs to be part of this series. Could you please rebase this onto the latest AES-NI changes that are in Herbert's tree? (as well as the ones I sent out today) They address some issues with indirect calls and excessive disabling of preemption, and your GCM and CTR changes are definitely going to be affected by this as well.