All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xen.org>
To: James Harper <james.harper@bendigoit.com.au>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: xenbus stress testing
Date: Fri, 18 Feb 2011 13:08:30 +0000	[thread overview]
Message-ID: <C9841FCE.13929%keir@xen.org> (raw)
In-Reply-To: <AEC6C66638C05B468B556EA548C1A77D01C55747@trantor>

On 18/02/2011 12:42, "James Harper" <james.harper@bendigoit.com.au> wrote:

>> You need to think about memory barriers and/or volatile.  Simply
>> "snapshotting" with an ordinary assignment doesn't work.
>> 
>> I don't know how this is done in Windows but the Linux kernel has a
>> clear explanation of the problem and how it's solved in Linux.  Look
>> in the kernel source tree in Documentation/memory-barriers.txt.
>> 
> 
> I issue a barrier (KeMemoryBarrier() which is a compiler and a memory
> barrier) after copying rsp_prod, eg:
> 
> rsp_prod = ring->rsp_prod;
> KeMemoryBarrier();
> Access the actual ring buffer
> 
> Is there anything else required?

Should be okay. That's basically what all other xenstore clients are doing.

 -- Keir

  reply	other threads:[~2011-02-18 13:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17  9:01 xenbus stress testing James Harper
2011-02-17 19:06 ` Ian Jackson
2011-02-17 22:17   ` James Harper
2011-02-18 11:05     ` Olaf Hering
2011-02-18 11:43       ` Paul Durrant
2011-02-18 12:01         ` Olaf Hering
2011-02-18 12:43           ` James Harper
2011-02-18 12:25     ` Ian Jackson
2011-02-18 12:42       ` James Harper
2011-02-18 13:08         ` Keir Fraser [this message]
2011-02-18 15:30         ` Ian Jackson
2011-02-18 22:36           ` James Harper

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=C9841FCE.13929%keir@xen.org \
    --to=keir@xen.org \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=james.harper@bendigoit.com.au \
    --cc=xen-devel@lists.xensource.com \
    /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.