* Re: virtio: imply disable_cb on callbacks
@ 2010-05-18 11:33 Michael S. Tsirkin
2010-05-19 4:37 ` Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2010-05-18 11:33 UTC (permalink / raw)
To: Rusty Russell; +Cc: virtualization, kvm
Rusty, the patch "virtio: imply disable_cb on callbacks" is on your tree.
I'd like to figure out how it works: for example:
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -69,6 +69,8 @@ static void blk_done(struct virtqueue *v
/* In case queue is stopped waiting for more buffers. */
blk_start_queue(vblk->disk->queue);
spin_unlock_irqrestore(&vblk->lock, flags);
+
+ vq->vq_ops->enable_cb(vq);
}
static bool do_req(struct request_queue *q, struct virtio_blk *vblk,
Since this does not check the return status from enable_cb,
it seems we could loose an interrupt if it arrives
between poll and callback enable?
Same might apply to other devices.
Thanks,
--
MST
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: virtio: imply disable_cb on callbacks
2010-05-18 11:33 virtio: imply disable_cb on callbacks Michael S. Tsirkin
@ 2010-05-19 4:37 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2010-05-19 4:37 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: virtualization, kvm
On Tue, 18 May 2010 09:03:17 pm Michael S. Tsirkin wrote:
> Rusty, the patch "virtio: imply disable_cb on callbacks" is on your tree.
> I'd like to figure out how it works: for example:
>
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -69,6 +69,8 @@ static void blk_done(struct virtqueue *v
> /* In case queue is stopped waiting for more buffers. */
> blk_start_queue(vblk->disk->queue);
> spin_unlock_irqrestore(&vblk->lock, flags);
> +
> + vq->vq_ops->enable_cb(vq);
> }
>
> static bool do_req(struct request_queue *q, struct virtio_blk *vblk,
>
>
> Since this does not check the return status from enable_cb,
> it seems we could loose an interrupt if it arrives
> between poll and callback enable?
It's been quite a while since I wrote this patch, and never really liked it
enough to polish it.
We would need to enable this *before* reading the queue, AFAICT.
I'll remove it from my series; it's in the wilderness area already :)
Thanks!
Rusty.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-19 4:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-18 11:33 virtio: imply disable_cb on callbacks Michael S. Tsirkin
2010-05-19 4:37 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).