Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966090AbbLQHhe (ORCPT ); Thu, 17 Dec 2015 02:37:34 -0500 Received: from mail-yk0-f182.google.com ([209.85.160.182]:33505 "EHLO mail-yk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751362AbbLQHhc (ORCPT ); Thu, 17 Dec 2015 02:37:32 -0500 MIME-Version: 1.0 In-Reply-To: <56711C0F.8030105@gmail.com> References: <56711C0F.8030105@gmail.com> Date: Thu, 17 Dec 2015 15:37:32 +0800 Message-ID: Subject: Re: [PATCH v2 0/2] Introduce the bulk IV mode for improving the crypto engine efficiency From: Baolin Wang To: Milan Broz Cc: Jens Axboe , Alasdair G Kergon , Mike Snitzer , dm-devel@redhat.com, neilb@suse.com, dan.j.williams@intel.com, martin.petersen@oracle.com, sagig@mellanox.com, Kent Overstreet , keith.busch@intel.com, tj@kernel.org, Mark Brown , Arnd Bergmann , linux-block@vger.kernel.org, linux-raid@vger.kernel.org, LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1763 Lines: 42 Hi Milan, On 16 December 2015 at 16:08, Milan Broz wrote: > On 12/16/2015 04:18 AM, Baolin Wang wrote: >> From the dm-crypt performance report, we found it shows low efficiency >> with crypto engine for some mode (like ecb or xts mode). Because in dm >> crypt, it will map the IO data buffer with scatterlist, and send the >> scatterlist of one bio to the encryption engine, if send more scatterlists >> with bigger size at one time, that helps the engine palys best performance, >> which means a high encryption speed. >> >> But now the dm-crypt only map one segment (always one sector) of one bio >> with one scatterlist to the crypto engine at one time. which is more >> time-consuming and ineffective for the crypto engine. Especially for some >> modes which don't need different IV for each sector, we can map the whole >> bio with multiple scatterlists to improve the engine performance. >> >> But this optimization is not support some ciphers and IV modes which should >> do sector by sector and need different IV for each sector. >> >> Change since v1: >> - Introduce one different IV mode. >> - Change the conditions for bulk mode. > > I tried the patchset on 32bit Intel VM and kernel immediately OOPsed (just tried aes-ecb)... > I've checked the code and I guess some macros I used with different definitions on different arch. Could you please try the new patchset with some optimization on your platform? It can work well on my arm board. Thanks. -- Baolin.wang Best Regards -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/