]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 19 Apr 2012 21:28:24 +0000 (17:28 -0400)
commit777711f358e4db42e305c58d08aa3c5494c1e918
treedeb41b5d7b7a261f1250f894f73a4634576c4786
parent3ba5446cd971668078afd5c082087c109145f045
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.

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