Received: by 10.192.165.156 with SMTP id m28csp1089528imm; Wed, 18 Apr 2018 04:02:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/RqxqGM8W7lNF9qWx4Hdy2R1zeiulLIafE3wwa+AEnzCxFvPcS7aOerfE3uNEDynO6tMXw X-Received: by 2002:a17:902:51ee:: with SMTP id y101-v6mr1587757plh.359.1524049370923; Wed, 18 Apr 2018 04:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524049370; cv=none; d=google.com; s=arc-20160816; b=gmZkXJgclHz/CtOykus5RGLVzzo0tix0MK5XTBZuiuEyKVj0zuiBQy5/mT61teEGT2 K+OK+8HQqb+4npNTKy79hOjDOTgoZTqolGn33I8M85ziSyUh5g6CWNjeAC/5W7OuLq4n KTznS1c3afF1wrQM2GSRBXFztqBdpIN7sVRkNYPhBLA8yFloOt41/4y+5UF3kzjWCE4q xYAYf07V1h6i+k6SY9pZ/A/g1abf9pUa9RsGX/b0x8VODvxgy2XiunC8geMZPJ+bHxIg O660L3E15a4MKAZuNS8h1HlAJEKNEcsvXyHDveTLK6fBm/Zvn/VAThVn2Bpu8WE5/cFk igjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=074i950FfotSom4ilzvqLBpVbHXK1iypK3ZlaNmRMYM=; b=cL0bMgJ2S1NYaLjyzDIbhpe1orQfuy/lGiK1LliH+NhByZFbSnh42H+5KTqy8wKsGb JPjoLQ5QSeK2dMG5VDZtA9dXS0ITMVUPae8c1sAe8ddIJcgqpWzcEGZDrvk5S+B5YeoG tyIKF9tLst6xRBqeHxCr884wG7rISlfy7W8LWTo99bRuWVZu5dvlWl+OkkMSkSs+lSaD 6xaeCwtXdrAPMU+Yq/WvCh6GjC/gQKr+WjGWJrK2o7Kxo0Ve8eL67ZLoFifwLTFH1pXv OnIHuoTM5h6C+vCKyVB5LdC2PCS0+hYUTJ02390wosSm8KCkJrOgv5qs8kVK1s3XomZ8 4cJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si938802pfl.268.2018.04.18.04.02.36; Wed, 18 Apr 2018 04:02:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753211AbeDRLB2 (ORCPT + 99 others); Wed, 18 Apr 2018 07:01:28 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:43996 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751879AbeDRLBZ (ORCPT ); Wed, 18 Apr 2018 07:01:25 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1f8kq3-0003vu-DP; Wed, 18 Apr 2018 19:01:23 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1f8kpv-0007xc-91; Wed, 18 Apr 2018 19:01:15 +0800 Date: Wed, 18 Apr 2018 19:01:15 +0800 From: Herbert Xu To: "Dey, Megha" Cc: "linux-kernel@vger.kernel.org" , "linux-crypto@vger.kernel.org" , "davem@davemloft.net" Subject: Re: [PATCH V8 1/5] crypto: Multi-buffer encryption infrastructure support Message-ID: <20180418110115.v2w3o5yfv4u3gc4r@gondor.apana.org.au> References: <1515542948-24041-1-git-send-email-megha.dey@linux.intel.com> <1515542948-24041-2-git-send-email-megha.dey@linux.intel.com> <20180118113905.GA19904@gondor.apana.org.au> <1516322661.2526.3.camel@megha-Z97X-UD7-TH> <20180316145351.GA6231@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 17, 2018 at 06:40:17PM +0000, Dey, Megha wrote: > > > >-----Original Message----- > >From: Herbert Xu [mailto:herbert@gondor.apana.org.au] > >Sent: Friday, March 16, 2018 7:54 AM > >To: Dey, Megha > >Cc: linux-kernel@vger.kernel.org; linux-crypto@vger.kernel.org; > >davem@davemloft.net > >Subject: Re: [PATCH V8 1/5] crypto: Multi-buffer encryption infrastructure > >support > > > >I have taken a deeper look and I'm even more convinced now that mcryptd is > >simply not needed in your current model. > > > >The only reason you would need mcryptd is if you need to limit the rate of > >requests going into the underlying mb algorithm. > > > >However, it doesn't do that all. Even though it seems to have a batch size of > >10, but because it immediately reschedules itself after the batch runs out, > >it's essentially just dumping all requests at the underlying algorithm as fast > >as they're coming in. The underlying algorithm doesn't have need throttling > >anyway because it'll do the work when the queue is full synchronously. > > > >So why not just get rid of mcryptd completely and expose the underlying > >algorithm as a proper async skcipher/hash? > > Hi Herbert, > > Most part of the cryptd.c and mcryptd.c are similar, except the logic used to flush out partially completed jobs > in the case of multibuffer algorithms. > > I think I will try to merge the cryptd and mcryptd adding necessary quirks for multibuffer where needed. I think you didn't quite get my point. From what I'm seeing you don't need either cryptd or mcryptd. You just need to expose the underlying mb algorithm directly. So I'm not sure what we would gain from merging cryptd and mcryptd. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt