Re: [PATCH v3] virtio_blk: unlock vblk->lock during kick

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 4, 2012 at 12:15 PM, Michael S. Tsirkin <mst@xxxxxxxxxx> wrote:
> On Fri, Jun 01, 2012 at 10:13:06AM +0100, Stefan Hajnoczi wrote:
>> Other block drivers (cciss, rbd, nbd) use spin_unlock_irq() so I followed that.
>> To me this seems wrong: blk_run_queue() uses spin_lock_irqsave() but we enable
>> irqs with spin_unlock_irq().  If the caller of blk_run_queue() had irqs
>> disabled and we enable them again this could be a problem, right?  Can someone
>> more familiar with kernel locking comment?
>
> Why take the risk?  What's the advantage of enabling them here? VCPU is
> not running while the hypervisor is processing the notification anyway.
> And the next line returns from the function so the interrupts will get
> enabled.

I agree.  After looking through the code more following Asias' call
chain, I'm happy to use spin_unlock() and not worry about the irq
part.

Will fix.

Stefan
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux