On 04/29/2011 02:55 PM, Pekka Enberg wrote: > On Fri, Apr 29, 2011 at 9:44 AM, Ingo Molnar <mingo@xxxxxxx> wrote: >> Hm, this looks a bit strange (the mutex here protects only a kernel call - that >> cannot be right) and there's no explanation why it's needed. Why do >> VIRTIO_BLK_IRQ (== KVM_IRQ_LINE ioctl()) calls have to be covered by the mutex? >> >> A short blurb about expected behavior on SMP and locking rules at the top of >> virtio-blk.c would be nice. > > Yes, looks strange. Asias, did you see some bad behavior that this > fixes? Yes. I see random virtio net hangs with scp test. This commit 847838c573f4c04be7547f508a99be2dfdefb4fd triggers this problem as we are using separte irq lines for each virtio devices instead of sharing one irq line for all virtio devices. > The per-device mutexes are there to protect device state. The > assumption here is that KVM handles KVM_IRQ_LINE ioctl() serialization > by titself. -- Best Regards, Asias He -- 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