-
Notifications
You must be signed in to change notification settings - Fork 0
dm-crypt: support relaxed memory alignment #486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: linus-master_base
Are you sure you want to change the base?
Conversation
|
Upstream branch: b543459 |
|
Upstream branch: b543459 |
4899f18 to
bfb6aa9
Compare
06634b5 to
8a473ad
Compare
|
Upstream branch: 944aacb |
bfb6aa9 to
54a6e8d
Compare
8a473ad to
fa94b37
Compare
|
Upstream branch: 944aacb |
54a6e8d to
8c7ab8b
Compare
fa94b37 to
41a5848
Compare
Many storage devices can handle DMA for data that is not aligned to the sector block size. The block and filesystem layers have introduced updates to allow that kind of memory alignment flexibility when possible. dm-crypt, however, currently constrains itself to aligned memory because it sends a single scatterlist element for the in/out list to the encrypt and decrypt algorithms. This forces applications that have unaligned data to copy through a bounce buffer, increasing CPU and memory utilization. Use multiple scatterlist elements to relax the memory alignment requirement. To keep this simple, this more flexible constraint is enabled only for certain encryption and initialization vector types, specifically the ones that don't have additional use for the request base scatterlist elements beyond holding decrypted data. Signed-off-by: Keith Busch <kbusch@kernel.org>
In the unlikely case where the base bio uses a highly fragmented vector, the four inline scatterlist elements may not be enough, so allocate a temporary scatterlist when needed. Signed-off-by: Keith Busch <kbusch@kernel.org>
|
Upstream branch: 6c79021 |
8c7ab8b to
96e5862
Compare
Pull request for series with
subject: dm-crypt: support relaxed memory alignment
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1042385