xen-blkfront: make blkif_io_lock spinlock per-device
authorSteven Noonan <snoonan@amazon.com>
Fri, 17 Feb 2012 20:04:44 +0000 (12:04 -0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 20 Mar 2012 11:52:41 +0000 (12:52 +0100)
commit3467811e26660eb46bc655234573d22d6876d5f9
treeb57b2cdc3d373af79062bc26cd71500773c64fb5
parentdad5cf659b202b5070c8616b5c515f6ca4db0c42
xen-blkfront: make blkif_io_lock spinlock per-device

This patch moves the global blkif_io_lock to the per-device structure. The
spinlock seems to exists for two reasons: to disable IRQs when in the interrupt
handlers for blkfront, and to protect the blkfront VBDs when a detachment is
requested.

Having a global blkif_io_lock doesn't make sense given the use case, and it
drastically hinders performance due to contention. All VBDs with pending IOs
have to take the lock in order to get work done, which serializes everything
pretty badly.

Signed-off-by: Steven Noonan <snoonan@amazon.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkfront.c