Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20201280rwd; Wed, 28 Jun 2023 22:05:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7RzoNtzP06xl2lhzYQOjP+O2wnrRmSZSHXHc3g+R2tiar72fyt6GG491r8zsNXCQw22sc4 X-Received: by 2002:a17:903:1105:b0:1b3:ebda:654e with SMTP id n5-20020a170903110500b001b3ebda654emr43539842plh.5.1688015128567; Wed, 28 Jun 2023 22:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688015128; cv=none; d=google.com; s=arc-20160816; b=QgjylF8Bq4k2cmMVcFIfw/QdES9wuHodNOWj4DVZN6T23OIL3b/eslzrYrKkptvKdG yKodz7JY6/J7tbi+AgLh/MWhG0+iwFZBEg4+O6ohSJOaujsD6cwTuN+i2UzyzaVO98su ioEh89q6tt5j9Hvcx6PLeo+lPjRA5BMk3T06m4UR/FMz2Xxo91PGwAhyaRwTcyReRstk X/f9vcloRECoXIxz7T2ISJeMicccAYIFdNOVQ4p31RztmIW/35v3cxaKUHfHaN2ixBWF r/Vu3f3YXpmgY2hRSsLucMvz910cxrE32rSaAU3Gy5+XUAnenURLI7e5GiUdQ3102jI1 eLcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=bY8DsHz0GM0fR/zHhboG0jDKCl4kQhSi9DW9zZKYvw4=; fh=bzOGK/natEwaIJJoxZPJY0Z6BlbVdYQ6Tmba2pwkuQU=; b=gD97SYUfb5WcC9osVaIwMfzfSe+ryij+lcqRiuitgtTKItzfXzQQZ/4v3cFOiH7R3J 7LvdeWiVuzRr9sWBJ2CJyNYDPOQ/rEQla+e6MxmoRJ2+3+51CXtrqPO7/szdJw1za+xY GJZxaOd1mncSeios78xLT26nQQVnGS9R9wCUHNV5oFjywCRhWND1BUpK20nwh3YHh9S5 ueBwH59rerqEBWwgjZldc3cih/Hi6nwIXOLC6USquiVm+pfBPThW94/2BnTBGifQdlN7 PLsue65MsBBl9Xx4JLs7XZxi1bdB4cTMJ1Me5NLJj6AIJxuD6oXvJZy86gOe+U+KxTIY /r6w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n14-20020a170902e54e00b001b3ca91e3c6si10627217plf.14.2023.06.28.22.05.05; Wed, 28 Jun 2023 22:05:28 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230082AbjF2Etz (ORCPT + 99 others); Thu, 29 Jun 2023 00:49:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbjF2Etx (ORCPT ); Thu, 29 Jun 2023 00:49:53 -0400 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E6F42134; Wed, 28 Jun 2023 21:49:49 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R741e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0VmCqHnt_1688014183; Received: from 30.97.48.232(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VmCqHnt_1688014183) by smtp.aliyun-inc.com; Thu, 29 Jun 2023 12:49:44 +0800 Message-ID: Date: Thu, 29 Jun 2023 12:49:43 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [v2 PATCH 0/5] crypto: Add akcipher interface without SGs To: Linus Torvalds , David Howells Cc: Ard Biesheuvel , Eric Biggers , Herbert Xu , Roberto Sassu , Stefan Berger , Mimi Zohar , dmitry.kasatkin@gmail.com, Jarkko Sakkinen , keyrings@vger.kernel.org, Linux Crypto Mailing List References: <570802.1686660808@warthog.procyon.org.uk> <20230628062120.GA7546@sol.localdomain> <20230628173346.GA6052@sol.localdomain> <3695542.1687977261@warthog.procyon.org.uk> From: Gao Xiang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 Hi Linus, On 2023/6/29 04:10, Linus Torvalds wrote: > On Wed, 28 Jun 2023 at 11:34, David Howells wrote: >> >> What about something like the Intel on-die accelerators (e.g. IAA and QAT)? I >> think they can do async compression. > > I'm sure they can. And for some made-up benchmark it might even help. > Do people use it in real life? > > The *big* wins come from being able to do compression/encryption > inline, when you don't need to do double-buffering etc. > > Anything else is completely broken, imnsho. Once you need to > double-buffer your IO, you've already lost the whole point. I'm not sure if I could say much about this for now, yet we're slowly evaluating Intel IAA builtin DEFLATE engine for our Cloud workloads and currently we don't have end-to-end numbers yet. Storage inline accelerators are great, especially "do {en,de}cryption inline" since it consumes very little on-chip memory, yet afaik "(de)compression" inline engine story is different since it needs more SRAM space for their LZ sliding windows for matching (e.g. 32kb for deflate each channel, 64kb for LZ4 each channel, and much much more for Zstd, LZMA, etc. I think those are quite expensive to integrate) in addition to some additional memory for huffman/FSE tables. So in production, inline "(de)compression" accelerators are hardly seen as a part of storage at least in end consumer markets. Intel already has their on-die accelerators (IAA very recently), yeah, it still needs double-buffer I/O, but we're considering at least using in async writeback/readahead use cases as a start for bulk async I/Os, which are not quite latency sensitive. Intel also shows their Zswap work [1] , yet I don't dive into that since I'm only focusing on storage use cases. As for crypto current apis (no matter acomp or scomp), I'm not sure I will say more too since I mostly agree with what Eric said previously. Thanks, Gao Xiang [1] https://lore.kernel.org/r/20230605201536.738396-1-tom.zanussi@linux.intel.com/ > > Linus >