DM-Crypt Adding "High Priority" Option In Linux 6.10
Queued up as part of the DeviceMapper dm-crypt changes for Linux 6.10 is adding a new "high priority" option.
The Linux kernel's dm-crypt code for transparent block device encryption will be honoring a "high_priority" option come Linux 6.10. Setting the "high_priority" option will set dm-crypt workqueues and the writer thread to high priority in order to improve throughput and latency but at the cost of degraded responsiveness of the system.
The patch by Red Hat's Mikulas Patocka explains:
Thus with this patch in DeviceMapper's for-next / dm-6.10 branch is the optional support for higher-end systems to set the "high_priority" option to enjoy higher throughput and better latency. But those on lower-tier hardware likely will be better off without using it. The Linux 6.10 merge window will be opening up in mid-May.
The Linux kernel's dm-crypt code for transparent block device encryption will be honoring a "high_priority" option come Linux 6.10. Setting the "high_priority" option will set dm-crypt workqueues and the writer thread to high priority in order to improve throughput and latency but at the cost of degraded responsiveness of the system.
The patch by Red Hat's Mikulas Patocka explains:
"When WQ_HIGHPRI was used for the dm-crypt kcryptd workqueue it was reported that dm-crypt performs badly when the system is loaded. Because of reports of audio skipping, dm-crypt stopped using WQ_HIGHPRI with commit f612b2132db5 (Revert "dm crypt: use WQ_HIGHPRI for the IO and crypt workqueues").
But it has since been determined that WQ_HIGHPRI provides improved performance (with reduced latency) for highend systems with much more resources than those laptop/desktop users which suffered from the use of WQ_HIGHPRI.
As such, add an option "high_priority" that allows the use of WQ_HIGHPRI for dm-crypt's workqueues and also sets the write_thread to nice level MIN_NICE (-20). This commit makes it optional, so that normal users won't be harmed by it."
Thus with this patch in DeviceMapper's for-next / dm-6.10 branch is the optional support for higher-end systems to set the "high_priority" option to enjoy higher throughput and better latency. But those on lower-tier hardware likely will be better off without using it. The Linux 6.10 merge window will be opening up in mid-May.
1 Comment