Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0526f65d authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Mark Salyzyn
Browse files

UPSTREAM: dm crypt: sort writes



(cherry pick from commit b3c5fd3052492f1b8d060799d4f18be5a5438add)

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 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: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Bug: 25392275
Change-Id: I0369c29eaae5e628cd7d58ca356f375a79561e7f
parent 22e1e646
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment