Cherry-pick dm-crypt performance improvement patch from Linux 5.9

Bug #1910976 reported by Yoann Dubreuil
152
This bug affects 34 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
In Progress
Undecided
gerald.yang
Bionic
In Progress
Undecided
gerald.yang
Focal
In Progress
Undecided
gerald.yang
Groovy
In Progress
Undecided
gerald.yang

Bug Description

=== SRU Justification ===
[Impact]
To get better performance for dm-crypt in some cases, bypass kcryptd workqueue can reduce the overhead in context switch between workers, cherry-pick commit 39d42fa96ba1b7d2544db3f8ed5da8fb0d5cb877 from mainline kernel, and bypass kcryptd workqueue is not enabled by default

[Fix]
Add flags to bypass kcryptd workqueue

[Test]
create dm-crypt and setup DM_CRYPT_NO_READ_WORKQUEUE and DM_CRYPT_NO_WRITE_WORKQUEUE, read/write data and run perf record to see if read/write to the encrypted device will bypass kcryptd workqueue

[Regression Potential]
Low, this feature is disabled by default, need to enable manually

========= original bug description =========
Hi,

I'm asking if it would be possible to cherry-pick patch "dm crypt: add flags to optionally bypass kcryptd workqueues" into the 5.4 Ubuntu kernel. This patch has been merged in mainline kernel 5.9 https://github.com/torvalds/linux/commit/39d42fa96ba1b7d2544db3f8ed5da8fb0d5cb877 but was not tagged for the stable tree.

This patch provides important performance gains for some workloads using dm-crypt / LUKS and cherry-picking it would be very beneficial for dm-crypt users. You can find details on the expected gain in the following links:

* https://www.redhat.com/archives/dm-devel/2020-July/msg00138.html
* https://blog.cloudflare.com/speeding-up-linux-disk-encryption/

The patch mostly applies cleanly on the Ubuntu 5.4 kernel, the only merge conflict is due to the module version at the end of the patch. I can provide a backport patch if needed.

Thanks,

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1910976

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Yoann Dubreuil (ydubreuil) wrote :

This LP bug is tracking a feature request and as such, I can't provide logs. I'll therefore change the status to Confirmed.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Alex Hung (alexhung) wrote :

I'd suggest to send a SRU (https://wiki.ubuntu.com/StableReleaseUpdates) or an email to ubuntu kernel (<email address hidden>) for broader audiences and more discussion.

Changed in linux (Ubuntu):
assignee: nobody → gerald.yang (gerald-yang-tw)
status: Confirmed → In Progress
description: updated
description: updated
Changed in linux (Ubuntu Bionic):
status: New → In Progress
Changed in linux (Ubuntu Focal):
status: New → In Progress
Changed in linux (Ubuntu Groovy):
status: New → In Progress
Changed in linux (Ubuntu Bionic):
assignee: nobody → gerald.yang (gerald-yang-tw)
Changed in linux (Ubuntu Groovy):
assignee: nobody → gerald.yang (gerald-yang-tw)
Changed in linux (Ubuntu Focal):
assignee: nobody → gerald.yang (gerald-yang-tw)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.