dm crypt: sort writes for-next for-3.18
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 28 Mar 2014 19:51:56 +0000 (15:51 -0400)
committerMike Snitzer <snitzer@redhat.com>
Tue, 15 Jul 2014 18:21:38 +0000 (14:21 -0400)
commit8b2b293dc0036f8c966868e2b9d3f25bcf5c145b
tree839e6bb60c8c27a68c13f90f0ff4e18874133e17
parent40e71620b1a59d464eebc359d08044d6586eaac3
dm crypt: sort writes

Write requests are sorted in a red-black tree structure and are
submitted in the sorted order.

In theory the sorting should be performed by the underlying disk
scheduler, however, in practice the disk scheduler only accepts and
sorts a finite number of requests.  To allow the sorting of all
requests, dm-crypt needs to implement its own own sorting.

The overhead associated with rbtree-based sorting is considered
negligible so it is not used conditionally.  Even on SSD sorting can be
beneficial since in-order request dispatch promotes lower latency IO
completion to the upper layers.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-crypt.c