virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: virtualization@lists.linux-foundation.org
Subject: Re: [PATCHv2] virtio: use smp_XX barriers on SMP
Date: Thu, 28 Jan 2010 15:37:08 +0200	[thread overview]
Message-ID: <20100128133708.GA3776@redhat.com> (raw)
In-Reply-To: <201001281001.09999.rusty@rustcorp.com.au>

On Thu, Jan 28, 2010 at 10:01:09AM +1030, Rusty Russell wrote:
> On Thu, 28 Jan 2010 09:12:23 am Michael S. Tsirkin wrote:
> > virtio is communicating with a virtual "device" that actually runs on
> > another host processor. Thus SMP barriers can be used to control
> > memory access ordering.
> > 
> > Where possible, we should use SMP barriers which are more lightweight than
> > mandatory barriers, because mandatory barriers also control MMIO effects on
> > accesses through relaxed memory I/O windows (which virtio does not use)
> > (compare specifically smp_rmb and rmb on x86_64).
> 
> Xen had a similar issue, in that UP guests running on SMP hosts need to issue
> SMP barriers.  Is this not also a requirement for virtio?

Of course it is. That's why I have ifdef CONFIG_SMP and use
mandatory barriers on UP.

> But I'm not sure what came out of the discussion: Jeremy?
> 
> Cheers,
> Rusty.

  reply	other threads:[~2010-01-28 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 22:42 [PATCHv2] virtio: use smp_XX barriers on SMP Michael S. Tsirkin
2010-01-27 23:31 ` Rusty Russell
2010-01-28 13:37   ` Michael S. Tsirkin [this message]
2010-01-28 21:14     ` Rusty Russell
2010-01-29 11:27       ` Michael S. Tsirkin
2010-01-30  4:52         ` Rusty Russell
2010-01-29 13:48       ` Michael S. Tsirkin

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=20100128133708.GA3776@redhat.com \
    --to=mst@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --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 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).