All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel BUG at drivers/virtio/virtio_ring.c:218!
@ 2008-04-04  8:16 Balaji Rao
  2008-04-05 13:53 ` Balaji Rao
  2008-04-05 13:53 ` Balaji Rao
  0 siblings, 2 replies; 7+ messages in thread
From: Balaji Rao @ 2008-04-04  8:16 UTC (permalink / raw)
  To: Rusty Russell; +Cc: kvm-devel, virtualization

Hi Rusty,

I hit a bug in virtio_ring.c:218 when I was stressing virtio_net using kvm with -smp 4.

static void vring_disable_cb(struct virtqueue *_vq)
{
        struct vring_virtqueue *vq = to_vvq(_vq);

        START_USE(vq);
-->        BUG_ON(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT);
        vq->vring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT;
        END_USE(vq);
}

Going through the source code, I felt that this BUG_ON is not required as any CPU could race and call disable_cb when one 
cpu still believes that its enabled. To validate my understanding, I commented out the BUG_ON and everything worked 
perfectly well.

I also get a lot of "Unlikely: restart svq race" on my console. Under high load conditions, a race could occur very often 
and I'm not sure if that signals a buggy situation. We could printk_ratelimit if at all we need to retain it.

If you agree, I'll send a patch to this.

-- 
thanks and regards,
Balaji Rao
Dept. of Mechanical Engineering,
National Institute of Technology Karnataka, India

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-04-06  8:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-04  8:16 kernel BUG at drivers/virtio/virtio_ring.c:218! Balaji Rao
2008-04-05 13:53 ` Balaji Rao
2008-04-05 13:53 ` Balaji Rao
2008-04-06  7:26   ` Rusty Russell
2008-04-06  8:13     ` Balaji Rao
2008-04-06  8:13     ` Balaji Rao
2008-04-06  7:26   ` Rusty Russell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.