Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754776AbbLDE5W (ORCPT ); Thu, 3 Dec 2015 23:57:22 -0500 Received: from mail-yk0-f181.google.com ([209.85.160.181]:36519 "EHLO mail-yk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813AbbLDE5U (ORCPT ); Thu, 3 Dec 2015 23:57:20 -0500 MIME-Version: 1.0 In-Reply-To: References: <20151111181813.GD12236@redhat.com> <20151112100422.GM12392@sirena.org.uk> <5644AFA2.6040201@kernel.dk> <20151113115144.GR12392@sirena.org.uk> <20151202195657.GB11127@agk-dp.fab.redhat.com> Date: Fri, 4 Dec 2015 12:57:19 +0800 Message-ID: Subject: Re: [dm-devel] [PATCH 0/2] Introduce the request handling for dm-crypt From: Baolin Wang To: Mikulas Patocka Cc: Mark Brown , Jens Axboe , keith.busch@intel.com, Jan Kara , Arnd Bergmann , Mike Snitzer , neilb@suse.com, LKML , linux-raid@vger.kernel.org, dm-devel@redhat.com, "Garg, Dinesh" , tj@kernel.org, bart.vanassche@sandisk.com, jmoyer@redhat.com, Alasdair G Kergon 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: 1981 Lines: 51 On 3 December 2015 at 23:47, Mikulas Patocka wrote: > > > On Thu, 3 Dec 2015, Baolin Wang wrote: > >> On 3 December 2015 at 03:56, Alasdair G Kergon wrote: >> > On Wed, Dec 02, 2015 at 08:46:54PM +0800, Baolin Wang wrote: >> >> These are the benchmarks for request based dm-crypt. Please check it. >> > >> > Now please put request-based dm-crypt completely to one side and focus >> > just on the existing bio-based code. Why is it slower and what can be >> > adjusted to improve this? >> > >> >> OK. I think I find something need to be point out. >> 1. From the IO block size test in the performance report, for the >> request based, we can find it can not get the corresponding >> performance if we just expand the IO size. Because In dm crypt, it >> will map the data buffer of one request with scatterlists, and send >> all scatterlists of one request to the encryption engine to encrypt or >> decrypt. I found if the scatterlist list number is small and each >> scatterlist length is bigger, it will improve the encryption speed, > > This optimization is only applicable to XTS mode. XTS has its weaknesses > and it is not recommended for encryption of more than 1TB of data > ( http://grouper.ieee.org/groups/1619/email/msg02357.html ) > > You can optimize bio-based dm-crypt as well (use larger encryption chunk > than 512 bytes when the mode is XTS). > > The most commonly used mode aes-cbc-essiv:sha256 can't be optimized that > way. You have to do encryption and decryption sector by sector because > every sector has different IV. Make sense. We'll optimize bio-based dm-crypt for XTS mode, and do some investigations for none XTS mode. > > Mikulas > -- 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/