]> 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)
commitd089169b82a4db953b94085875ded8e35cc626da
treebb2f80fd9a3be90a710e2e2053c246ff1dedf6f7
parent404c74cdedc541fbfb189c77954f99f29ece133b
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