From: "Michael S. Tsirkin" <mst@redhat•com>
To: virtualization@lists•linux-foundation.org,
Rusty Russell <rusty@rustcorp•com.au>,
Jiri Pirko <jpirko@redhat•com>, Shirley Ma <xma@us•ibm.com>,
netdev@vger•kernel.org, linux-kernel@vge
Subject: potential race in virtio ring?
Date: Mon, 14 Jun 2010 16:59:12 +0300 [thread overview]
Message-ID: <20100614135912.GA25015@redhat.com> (raw)
Hi!
I was going over the vring code and noticed, that
the ring has this check:
irqreturn_t vring_interrupt(int irq, void *_vq)
{
struct vring_virtqueue *vq = to_vvq(_vq);
if (!more_used(vq)) {
pr_debug("virtqueue interrupt with no work for %p\n", vq);
return IRQ_NONE;
static inline bool more_used(const struct vring_virtqueue *vq)
{
return vq->last_used_idx != vq->vring.used->idx;
}
My concern is that with virtio net, more_used is called
on a CPU different from the one that polls the vq.
This might mean that last_used_idx value might be stale.
Could this lead to a missed interrupt?
Thanks,
--
MST
reply other threads:[~2010-06-14 13:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20100614135912.GA25015@redhat.com \
--to=mst@redhat$(echo .)com \
--cc=jpirko@redhat$(echo .)com \
--cc=linux-kernel@vge \
--cc=netdev@vger$(echo .)kernel.org \
--cc=rusty@rustcorp$(echo .)com.au \
--cc=virtualization@lists$(echo .)linux-foundation.org \
--cc=xma@us$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox