All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] Re: [PATCH 2/3] virtio network device
Date: Tue, 18 Dec 2007 13:31:51 +1100	[thread overview]
Message-ID: <200712181331.52341.rusty@rustcorp.com.au> (raw)
In-Reply-To: <475F3C1B.707@codemonkey.ws>

On Wednesday 12 December 2007 12:40:43 Anthony Liguori wrote:
> Rusty Russell wrote:
> > On Sunday 09 December 2007 09:02:48 Anthony Liguori wrote:
> >> If QEMU ever got true SMP support, then virtio would not work as it
> >> requires 16-bit atomic writes which AFAIK is not possible on a number of
> >> non-x86 architectures.
> >
> > Hmm?  Where is this requirement coming from?
> >
> > I think everyone should stop using the word "atomic" in virtio
> > discussions; it's confusing.
>
> The virtio ring queue indices are 16-bit and are readable to one end
> while writable on the other end.  To ensure that this can be done in a
> lock-less way, it's necessary to atomically update the index.  Atomic is
> the right word here because if the 16-bit write gets converted into two
> 8-bit writes, then very bad things could happen with SMP.

Of course, but that's insane.  Your assertion that it's not possible on a 
number of non-x86 architectures is what I'm questioning here.  You're 
confusing the inability of architectures to atomically *modify* a 16 bit 
value and our requirement, where even if you found an architecture which 
couldn't do 16 bit writes, you can do it as a 32 bit write.

Hope that clarifies,
Rusty.

  reply	other threads:[~2007-12-18  2:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 21:54 [Qemu-devel] [PATCH 2/3] virtio network device Anthony Liguori
2007-12-04 22:12 ` Anthony Liguori
2007-12-04 23:49 ` [Qemu-devel] " Dor Laor
2007-12-05 17:18   ` Anthony Liguori
2007-12-05 17:44     ` Paul Brook
2007-12-05 20:20       ` Anthony Liguori
2007-12-06  9:27         ` Jamie Lokier
2007-12-08 13:22         ` Paul Brook
2007-12-08 14:09           ` Jamie Lokier
2007-12-08 16:45             ` Paul Brook
2007-12-08 19:52               ` Blue Swirl
2007-12-08 21:55               ` Jamie Lokier
2007-12-08 22:02                 ` Anthony Liguori
2007-12-12  1:24                   ` Rusty Russell
2007-12-12  1:40                     ` Anthony Liguori
2007-12-18  2:31                       ` Rusty Russell [this message]
2007-12-08 21:59           ` Anthony Liguori

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=200712181331.52341.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=aliguori@us.ibm.com \
    --cc=anthony@codemonkey.ws \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.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.