Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-10-02 Thread Stefan Hajnoczi
On Thu, Sep 27, 2012 at 12:01 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/09/2012 02:10, Rusty Russell ha scritto: +do { +virtqueue_disable_cb(vq); +while ((vbr = virtqueue_get_buf(vblk-vq, len)) != NULL) { +if

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-28 Thread Rusty Russell
Asias He as...@redhat.com writes: I forgot about the cool hack which MST put in to defer event updates using disable_cb/enable_cb. Hmm, are you talking about virtqueue_enable_cb_delayed()? Just the fact that virtqueue_disable_cb() prevents updates of used_index, and then we do the update in

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-28 Thread Asias He
On 09/28/2012 02:08 PM, Rusty Russell wrote: Asias He as...@redhat.com writes: I forgot about the cool hack which MST put in to defer event updates using disable_cb/enable_cb. Hmm, are you talking about virtqueue_enable_cb_delayed()? Just the fact that virtqueue_disable_cb() prevents

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-28 Thread Michael S. Tsirkin
On Thu, Sep 27, 2012 at 09:40:03AM +0930, Rusty Russell wrote: I forgot about the cool hack which MST put in to defer event updates using disable_cb/enable_cb. I considered sticking some invalid value in event index on disable but in my testing it did not seem to give any gain, and knowing

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-27 Thread Paolo Bonzini
Il 27/09/2012 02:10, Rusty Russell ha scritto: +do { +virtqueue_disable_cb(vq); +while ((vbr = virtqueue_get_buf(vblk-vq, len)) != NULL) { +if (vbr-bio) { +virtblk_bio_done(vbr); +

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-26 Thread Rusty Russell
Asias He as...@redhat.com writes: On 09/25/2012 10:36 AM, Asias He wrote: This reduces unnecessary interrupts that host could send to guest while guest is in the progress of irq handling. If one vcpu is handling the irq, while another interrupt comes, in handle_edge_irq(), the guest will

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-25 Thread Asias He
On 09/25/2012 10:36 AM, Asias He wrote: This reduces unnecessary interrupts that host could send to guest while guest is in the progress of irq handling. If one vcpu is handling the irq, while another interrupt comes, in handle_edge_irq(), the guest will mask the interrupt via mask_msi_irq()

[PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-24 Thread Asias He
This reduces unnecessary interrupts that host could send to guest while guest is in the progress of irq handling. If one vcpu is handling the irq, while another interrupt comes, in handle_edge_irq(), the guest will mask the interrupt via mask_msi_irq() which is a very heavy operation that goes