Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp191345imm; Thu, 10 May 2018 18:25:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqSOPYDm/BGsygP6IUUNZ0wRxkiJWwJZ6XnQsOPsLxUNsFgQHqCeuAIqfoUr4i+M4wll1wV X-Received: by 2002:a17:902:8:: with SMTP id 8-v6mr3376111pla.287.1526001909593; Thu, 10 May 2018 18:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526001909; cv=none; d=google.com; s=arc-20160816; b=X3lGwWGTMNNdC2VIrHVIu1f+D6FMONfMaVtxYAiYAzafkP+hrovCoQ2LtlFuG4e/E9 C4RIh02NtOAz86jDP1rtovv5ElTe9NfW4B0v+xm9MYdm1h0NmUn0mJiVrvprV4QgJ5i2 /iBUAelcKIKCSm42qkkMnRXd09QPR57M5x+0S0KdBMKlnXQpM7CBT9oWXRhMKoxVVf6S 8bxIblK1SwKv7SNzDVCGR8Y8cTVmkoE8Y2Xa4pVG3Gq9G+Uik5osJzFsIoeJgK7RM9hP iILy4fvJ+PvQoXHeEr9I5o48oJbhL3H9hJ1zR0wQGmJULnsf/Z9lC+QRKca9EHNFaHsA UdJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=rwRhi22OdrV4Y82RMg+lNshWfP9j6r+gvA2bfA4C8f8=; b=ZDMIWMuVfHXQQuyaBz0cnlHrI5+ys80mSLxPsmdTPn+POplm+5Tt0Sql/ZDPxBJCZo 7w3XpqNPuwTi3Bs9fqS1CDt/pnMP2ai6hYksArpvD5DBcd09w3QYyRlaYbSolALnO00c flwbicrhR9hilbfO59gu4g79k07V5Bof9e/CTwnD5kPR6BW2yUUR27nrlsOeHtpfVRqD HBCYfHEJNeAvJPHvq+eZQE5GtZBG+WtmpQsvDsZagv5IHhsLgyGJByn6+74wl10E/61y G5zZCL0Cp3P6iBWlgxn0QhE6Pd4DAyId+PfG9/sRbIbjIdePcHVYKm1GnRsI1NHpRCza Bv7g== 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 b11-v6si1539523pgt.629.2018.05.10.18.24.55; Thu, 10 May 2018 18:25:09 -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 S1751430AbeEKBYp convert rfc822-to-8bit (ORCPT + 99 others); Thu, 10 May 2018 21:24:45 -0400 Received: from mga18.intel.com ([134.134.136.126]:53085 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750798AbeEKBYn (ORCPT ); Thu, 10 May 2018 21:24:43 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2018 18:24:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,387,1520924400"; d="scan'208";a="198427354" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by orsmga004.jf.intel.com with ESMTP; 10 May 2018 18:24:43 -0700 Received: from orsmsx111.amr.corp.intel.com ([169.254.12.62]) by ORSMSX103.amr.corp.intel.com ([169.254.5.20]) with mapi id 14.03.0319.002; Thu, 10 May 2018 18:24:42 -0700 From: "Dey, Megha" To: Herbert Xu 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 Thread-Topic: [PATCH V8 1/5] crypto: Multi-buffer encryption infrastructure support Thread-Index: AQHTiaT71VA7Q5Or9ESQdIw+yX/ir6N6FLYAgFlFdnuAMogJgIABiP2AgABwaXCAAKKQgIAI0PhwgAKZVoCACDnDsIAJDTaAgAVJM2A= Date: Fri, 11 May 2018 01:24:42 +0000 Message-ID: References: <20180118113905.GA19904@gondor.apana.org.au> <1516322661.2526.3.camel@megha-Z97X-UD7-TH> <20180316145351.GA6231@gondor.apana.org.au> <20180418110115.v2w3o5yfv4u3gc4r@gondor.apana.org.au> <20180419032525.6csodbz6lrksyudd@gondor.apana.org.au> <20180426094445.4jiwondmtbenepo2@gondor.apana.org.au> <20180507093511.jscgnk436e3ba4un@gondor.apana.org.au> In-Reply-To: <20180507093511.jscgnk436e3ba4un@gondor.apana.org.au> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzE5NjA3NDMtNDdmZS00ODM5LWI0YjItNDMyN2I4MWRkMmZiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Im5ocm9vTUU5cUxvTEs1T0t4WHZGdFVnVzAyNnVLMFN5MlNVZGRneStJUVk9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >-----Original Message----- >From: Herbert Xu [mailto:herbert@gondor.apana.org.au] >Sent: Monday, May 7, 2018 2:35 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 > >On Tue, May 01, 2018 at 10:39:15PM +0000, Dey, Megha wrote: >> >> crypto/simd.c provides a simd_skcipher_create_compat. I have used the >> same template to introduce simd_ahash_create_compat which would wrap >around the inner hash algorithm. >> >> Hence we would still register 2 algs, outer and inner. > >Right. > >> Currently we have outer_alg -> mcryptd alg -> inner_alg >> >> Mcryptd is mainly providing the following: >> 1. Ensuring the lanes(8 in case of AVX2) are full before dispatching to the >lower inner algorithm. This is obviously why we would expect better >performance for multi-buffer as opposed to the present single-buffer >algorithms. >> 2. If there no new incoming jobs, issue a flush. >> 3. A glue layer which sends the correct pointers and completions. >> >> If we get rid of mcryptd, these functions needs to be done by someone. Since >all multi-buffer algorithms would require this tasks, where do you suggest these >helpers live, if not the current mcryptd.c? > >That's the issue. I don't think mcryptd is doing any of these claimed functions >except for hosting the flush helper which could really live anywhere. > >All these functions are actually being carried out in the inner algorithm already. > >> I am not sure if you are suggesting that we need to get rid of the mcryptd >work queue itself. In that case, we would need to execute in the context of the >job requesting the crypto transformation. > >Which is fine as long as you can disable the FPU. If not the simd wrapper will >defer the job to kthread context as required. Hi Herbert, Are you suggesting that the SIMD wrapper, will do what is currently being done by the ' mcryptd_queue_worker ' function (assuming FPU is not disabled) i.e dispatching the job to the inner algorithm? I have got rid of the mcryptd layer( have an inner layer, outer SIMD layer, handled the pointers and completions accordingly), but still facing some issues after removing the per cpu mcryptd_cpu_queue. > >Cheers, >-- >Email: Herbert Xu Home Page: >http://gondor.apana.org.au/~herbert/ >PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt