linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/3] Introduce the bulk mode method when sending request to crypto layer
@ 2016-05-27 11:11 Baolin Wang
  2016-05-27 11:11 ` [RFC v2 1/3] block: Introduce blk_bio_map_sg() to map one bio Baolin Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Baolin Wang @ 2016-05-27 11:11 UTC (permalink / raw)
  To: axboe, agk, snitzer, dm-devel, herbert, davem
  Cc: ebiggers3, js1304, tadeusz.struk, smueller, standby24x7, shli,
	dan.j.williams, martin.petersen, sagig, kent.overstreet,
	keith.busch, tj, ming.lei, broonie, arnd, linux-crypto,
	linux-block, linux-raid, linux-kernel, baolin.wang

This patchset will check if the cipher can support bulk mode, then dm-crypt
will handle different ways to send requests to crypto layer according to
cipher mode. For bulk mode, we can use sg table to map the whole bio and
send all scatterlists of one bio to crypto engine to encrypt or decrypt,
which can improve the hardware engine's efficiency.

As Milan pointed out we need one driver with using the new 'CRYPTO_ALG_BULK'
flag, I'll add one cipher engine driver with 'CRYPTO_ALG_BULK' flag to test
this optimization in next version, if I am sure this optimization is on the
right direction according to your comments.

Looking forward to any comments and suggestions. Thanks.

Changes since v1:
 - Refactor the blk_bio_map_sg() function to avoid duplicated code.
 - Move the sg table allocation to crypt_ctr_cipher() function to avoid memory
 allocation in the IO path.
 - Remove the crypt_sg_entry() function.
 - Other optimization.

Baolin Wang (3):
  block: Introduce blk_bio_map_sg() to map one bio
  crypto: Introduce CRYPTO_ALG_BULK flag
  md: dm-crypt: Introduce the bulk mode method when sending request

 block/blk-merge.c         |   36 +++++++++--
 drivers/md/dm-crypt.c     |  145 ++++++++++++++++++++++++++++++++++++++++++++-
 include/crypto/skcipher.h |    7 +++
 include/linux/blkdev.h    |    2 +
 include/linux/crypto.h    |    6 ++
 5 files changed, 190 insertions(+), 6 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-06-06  5:04 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-27 11:11 [RFC v2 0/3] Introduce the bulk mode method when sending request to crypto layer Baolin Wang
2016-05-27 11:11 ` [RFC v2 1/3] block: Introduce blk_bio_map_sg() to map one bio Baolin Wang
2016-06-03 14:35   ` Jens Axboe
2016-06-06  5:03     ` Baolin Wang
2016-06-03 14:38   ` Jens Axboe
2016-06-06  5:04     ` Baolin Wang
2016-05-27 11:11 ` [RFC v2 2/3] crypto: Introduce CRYPTO_ALG_BULK flag Baolin Wang
2016-06-02  8:26   ` Herbert Xu
2016-06-03  6:48     ` Baolin Wang
2016-06-03  6:51       ` Herbert Xu
2016-06-03  7:10         ` Baolin Wang
2016-06-03  7:54           ` Herbert Xu
2016-06-03  8:15             ` Baolin Wang
2016-06-03  8:21               ` Herbert Xu
2016-06-03  9:23                 ` Baolin Wang
2016-06-03 10:09                   ` Herbert Xu
2016-06-03 10:47                     ` Baolin Wang
2016-05-27 11:11 ` [RFC v2 3/3] md: dm-crypt: Introduce the bulk mode method when sending request Baolin Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).