On 3/6/23 10:02, Mikulas Patocka wrote:
On Tue, 28 Feb 2023, yangerkun wrote:
It's ok to fix the softlockup, but for async write encrypt,
kcryptd_crypt_write_io_submit will add bio to write_tree, and once we
call cond_resched before every kcryptd_io_write, the write performance
may be poor while we meet a high cpu usage scene.
Hi
To fix this problem, find the PID of the process "dmcrypt_write" and
change its priority to -20, for example "renice -n -20 -p 34748".
This is the proper way how to fix it; locking up the process for one
second is not.
We used to have high-priority workqueues by default, but it caused audio
playback skipping, so we had to revert it - see
f612b2132db529feac4f965f28a1b9258ea7c22b.
Perhaps we should add an option to have high-priority kernel threads?
Would calling cond_resched() every n iterations instead of every
iteration help? From mm/swapfile.c:
if (unlikely(--latency_ration < 0)) {
cond_resched();
latency_ration = LATENCY_LIMIT;
}
Thanks,
Bart.
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel