On 08/12/2009 12:11 PM, Gleb Natapov wrote:
On Wed, Aug 12, 2009 at 11:29:00AM +0300, Avi Kivity wrote:
On 08/11/2009 03:31 PM, Gleb Natapov wrote:
Change irq_lock from mutex to spinlock. We do not sleep while holding
it.
But why change?
Isn't it more lightweight? For the remaining use of the lock it doesn't
really matters, but if I see mutex used somewhere I assume there are
users that sleeps.
Before the recent change, a mutex was more expensive if there was
contention (waiter would schedule out). Recently the mutex code was
changed to spin while the holder was running.
The only motivation I can see is to allow injection from irqfd and
interrupt contexts without requiring a tasklet/work. But that needs
spin_lock_irqsave(), not spin_lock().
After this series the lock is used only to protect modification of irq
table, add/delete of ack notifiers and irq source id allocator. None of
this affects injection from irqfd.
Then it can be definitely left as mutex.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html