Skip to content
Commit 50bd3774 authored by Chao Yu's avatar Chao Yu Committed by NeilBrown
Browse files

md: avoid potential long delay under pers_lock



printk may cause long time lapse if value of printk_delay in sysctl is
configured large by user. If register_md_personality takes long time to print in
spinlock pers_lock, we may encounter high CPU usage rate when there are other
pers_lock competitors who may be blocked to spin.
We can avoid this condition by moving printk out of coverage of pers_lock
spinlock.

Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 0638bb0e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment