All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Balaji Rao <balajirrao@gmail.com>
Cc: kvm-devel@lists.sourceforge.net, borntraeger@de.ibm.com,
	virtualization@lists.linux-foundation.org
Subject: Re: kernel BUG at drivers/virtio/virtio_ring.c:218!
Date: Sun, 6 Apr 2008 17:26:33 +1000	[thread overview]
Message-ID: <200804061726.33918.rusty@rustcorp.com.au> (raw)
In-Reply-To: <200804051923.39933.balajirrao@gmail.com>

On Sunday 06 April 2008 00:53:39 Balaji Rao wrote:
> On Friday 04 April 2008 01:46:21 pm Balaji Rao wrote:
> > 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.
>
> Christian Borntraeger CCed.

Hi Balaji,

Interesting case.... can you put a '#define DEBUG' at the top of 
drivers/virtio/virtio_ring.c and re-run?

The reason we don't simply remove that check is that interrupt bugs are nasty 
to track down, usually leading to performance problems rather than outright 
breakage.

Thanks!
Rusty.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

  reply	other threads:[~2008-04-06  7:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2008-04-06  8:13     ` Balaji Rao
2008-04-06  8:13     ` Balaji Rao
2008-04-06  7:26   ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200804061726.33918.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=balajirrao@gmail.com \
    --cc=borntraeger@de.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.