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

Commit 22e1e646 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Mark Salyzyn
Browse files

UPSTREAM: dm crypt: offload writes to thread



(cherry pick from commit dc2676210c425ee8e5cb1bec5bc84d004ddf4179)

Submitting write bios directly in the encryption thread caused serious
performance degradation.  On a multiprocessor machine, encryption requests
finish in a different order than they were submitted.  Consequently, write
requests would be submitted in a different order and it could cause severe
performance degradation.

Move the submission of write requests to a separate thread so that the
requests can be sorted before submitting.  But this commit improves
dm-crypt performance even without having dm-crypt perform request
sorting (in particular it enables IO schedulers like CFQ to sort more
effectively).

Note: it is required that a previous commit ("dm crypt: don't allocate
pages for a partial request") be applied before applying this patch.
Otherwise, this commit could introduce a crash.

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Bug: 25392275
Change-Id: Ia94a8e9d8c62d4c209c3ab7cfe5c28ce0d59cf73
parent 80199e83
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