Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1258986pxp; Sun, 6 Mar 2022 09:52:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqdeyWFXtPDDt98UaerQ5oU5dkkTLuERF6fVFNXfpbcwJFFcps+GDTplPo1esAH8khShJO X-Received: by 2002:a17:906:3cea:b0:6da:ea45:ea9e with SMTP id d10-20020a1709063cea00b006daea45ea9emr6392702ejh.574.1646589143224; Sun, 06 Mar 2022 09:52:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646589143; cv=none; d=google.com; s=arc-20160816; b=S6LDlc3rpjhrN1jzOUcECSKPswNGX3QcO7eeUQskkhR7cbw/7UMga1yGsqdYh3YtTY JEFgd1Sijco+vdOymEuDlOU96SPqWlY6v8pVz0j0XOeZa3goIINXGRk8S0rkAHVEslkP gA6I1mfkX3+4fHEYJPGhglzZAUoq6ws5zzT4XK/3cZnYdj2/oqUc8b/jXCYH6BEPr3ok DoYdi8TfUwxV9Nap4Olq39JTm9ZSz9nBBQyYuxTH/O0sTKyVnQcZpmJPSX2ng2E15V+L j9fUZhbFQseNauy/pQzY03RGIpKBqbsH1eyjUiB5RKIjTwHzBgWnDxI++JD8qQ6Qfm47 PxzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature; bh=rFYquMxNM8N4oF6eX6nVnTTdCqnZXtOHVapCAByP2+0=; b=cYsKfq3q1jUwXdOnidoQFwF1sYPcvSNe/kcjuC3XNlNDOUl5FnziRjPss9jWzSo2zu yD31LjIVfDjBajlxSy3Wwpf7Fw/tF526EaSQtNSjEhFNx3iD0vGyKxryOL2aCqubTHuN kMZ8qC+xRs4brV3NIFcIG2qTTSu5Y4CrNIzv5t5B8s0x02bgOaGcHAIpV0iew43HCJ0X QIm6kamJ9d1GbilIOhgC3bH+OZ0sH72kjEHkElzmQR4jfOuN9Zo4UzQYaoQXRZKNjvqo ZZqrbMPVVpbUOrQF80oTu6Y9mHJMG+YDMJkBADcz2dIgd+1ZRp+V2zeoJHOSrh3mAU3y qBxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fMZqskKr; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a170906584f00b006d2e3a632c5si6733924ejs.275.2022.03.06.09.51.59; Sun, 06 Mar 2022 09:52:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fMZqskKr; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232053AbiCESjN (ORCPT + 99 others); Sat, 5 Mar 2022 13:39:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229869AbiCESjN (ORCPT ); Sat, 5 Mar 2022 13:39:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ABD460DD for ; Sat, 5 Mar 2022 10:38:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3F589B80C75 for ; Sat, 5 Mar 2022 18:38:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E538BC004E1; Sat, 5 Mar 2022 18:38:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646505499; bh=X+5XheZZoPEoAGtNpdtKssVpOcfU8kisJHtPXmyuyg0=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=fMZqskKrffdGNwtjOkh+xFt/AR9nVr3pAbVk5HopWG4eX17WqXBe3RnqP0kgQhi+K NDOJ5OglFn6MrcBrOjAFqK1AH52GK/mrd/6TELrivC9bIkVp3SYi/x+GGtKmRIU/09 /08ow7J5Y46e3YLJ1ITjo2TjnFiDUaGSfiJ4dE/QsBK1pT+MWtlrHJGjjMXYHDd/6Z 2xAYrNkkVnT08yb9226FJeTlLaHmXf3TjFZkk+87WZB9L/FyUvM3CPKs0toEsc+E8N kPCN/hrP/nzDurhKJRZXJM435b17DBlTZmZyEPrExPXAIwyVzcbtPybAWfSLzC01ZM 8SnEJvr9zKixg== Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 9BC9E27C005B; Sat, 5 Mar 2022 13:38:17 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute5.internal (MEProxy); Sat, 05 Mar 2022 13:38:17 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddutddgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedftehn ugihucfnuhhtohhmihhrshhkihdfuceolhhuthhosehkvghrnhgvlhdrohhrgheqnecugg ftrfgrthhtvghrnheptdfhheettddvtedvtedugfeuuefhtddugedvleevleefvdetleff gfefvdekgeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprghnugihodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeiudek heeifedvqddvieefudeiiedtkedqlhhuthhopeepkhgvrhhnvghlrdhorhhgsehlihhnuh igrdhluhhtohdruhhs X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 91BEA21E006E; Sat, 5 Mar 2022 13:38:16 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4778-g14fba9972e-fm-20220217.001-g14fba997 Mime-Version: 1.0 Message-Id: In-Reply-To: <0a21fe4d-b135-3696-71f0-aa14ca715d51@intel.com> References: <1611386920-28579-1-git-send-email-megha.dey@intel.com> <3878af8d-ac1e-522a-7c9f-fda4a1f5b967@intel.com> <0a10e16b-df77-9a7f-6964-8dc3e114b30b@intel.com> <0a21fe4d-b135-3696-71f0-aa14ca715d51@intel.com> Date: Sat, 05 Mar 2022 10:37:56 -0800 From: "Andy Lutomirski" To: "Dey, Megha" , "Dave Hansen" , "Herbert Xu" Cc: "Tony Luck" , "Asit K Mallick" , "H. Peter Anvin" , "Linux Crypto Mailing List" , "David S. Miller" , "Shankar, Ravi V" , "Chen, Tim C" , "Kleen, Andi" , greg.b.tucker@intel.com, rajendrakumar.chinnaiyan@intel.com, tomasz.kantecki@intel.com, ryan.d.saffores@intel.com, "Ira Weiny" , "Eric Biggers" , "Ard Biesheuvel" , "the arch/x86 maintainers" , anirudh.venkataramanan@intel.com Subject: Re: [RFC V2 0/5] Introduce AVX512 optimized crypto algorithms Content-Type: text/plain X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Feb 24, 2022, at 11:31 AM, Dey, Megha wrote: > Hi all, > > On 1/31/2022 11:18 AM, Dave Hansen wrote: >> On 1/31/22 10:43, Dey, Megha wrote: >>> With this implementation, we see a 1.5X improvement on ICX/ICL for 16KB >>> buffers compared to the existing kernel AES-GCM implementation that >>> works on 128-bit XMM registers. >> What is your best guess about how future-proof this implementation is? >> >> Will this be an ICL/ICX one-off? Or, will implementations using 256-bit >> YMM registers continue to enjoy a frequency advantage over the 512-bit >> implementations for a long time? > > Dave, > > This would not be an ICL/ICX one off. For the foreseeable future, > AVX512VL YMM implementations will enjoy a frequency advantage over > AVX512L ZMM implementations. > > Although, over time, ZMM and YMM will converge when it comes to performance. > > Herbert/Andy, > > Could you please let us know if this approach is a viable one and would > be acceptable by the community? > > Optimizing crypto algorithms using AVX512VL instructions gives a 1.5X > performance improvement over existing AES-GCM algorithm in the > kernel(using XMM registers) with no frequency drop. I'm assuming this would be enabled automatically without needing any special command line options. If so, it seems reasonable to me. --Andy