]> git.baikalelectronics.ru Git - kernel.git/commit
raid5: get_active_stripe avoids device_lock
authorShaohua Li <shli@kernel.org>
Wed, 9 Apr 2014 03:27:42 +0000 (11:27 +0800)
committerNeilBrown <neilb@suse.de>
Wed, 9 Apr 2014 04:42:42 +0000 (14:42 +1000)
commitafa8ee521b91d16abbd92e6d3af1a7d1ca1f690c
treebb2f80fd9a3be90a710e2e2053c246ff1dedf6f7
parent0fd64e7f7d6c29f011e62c939d47e962dc68e0bb
raid5: get_active_stripe avoids device_lock

For sequential workload (or request size big workload), get_active_stripe can
find cached stripe. In this case, we always hold device_lock, which exposes a
lot of lock contention for such workload. If stripe count isn't 0, we don't
need hold the lock actually, since we just increase its count. And this is the
hot code path for such workload. Unfortunately we must delete the BUG_ON.

Signed-off-by: Shaohua Li <shli@fusionio.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c