md: avoid potential long delay under pers_lock
authorChao Yu <chao2.yu@samsung.com>
Thu, 25 Sep 2014 07:28:34 +0000 (15:28 +0800)
committerNeilBrown <neilb@suse.de>
Tue, 14 Oct 2014 02:08:28 +0000 (13:08 +1100)
commit50bd3774058137e687b41da8b31fdd3544f7d901
tree73e3c10f5721e20064e6d48115ed295f9f447e43
parent0638bb0e732fa2c839fceec93fc02e2347e0f596
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: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c