From: Juergen Gross <juergen.gross@fujitsu-siemens.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Timothy Hayes <hayesti@tcd.ie>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Atomic operations
Date: Thu, 26 Mar 2009 08:34:24 +0100 [thread overview]
Message-ID: <49CB3000.3080208@fujitsu-siemens.com> (raw)
In-Reply-To: <C5F0DE54.4FA8%keir.fraser@eu.citrix.com>
Keir Fraser wrote:
> The Linux atomic.h operations will be atomic even across domains.
... unless CONFIG_SMP was not defined in the domU kernel build.
Juergen
> On 26/03/2009 00:17, "Timothy Hayes" <hayesti@tcd.ie> wrote:
>
> I'm sure a lot of you know XenSocket (XVMSocket), if not, it's a
> Loadable Kernel Module with a socket interface that sends/receives
> to/from a shared page of memory mapped between two domains. It's
> quite a nice idea and brings data throughput close to UNIX sockets.
> I made some changes and made it compatible with Xen 3.2 and a newer
> Linux kernel (I'm testing it with 2.6.25.20) however I'm noticing
> some odd behaviour occasionally. In it, there are atomic_t variables
> in a descriptor inside a shared memory page. When a domain sends or
> receives from the socket, it will use one of the atomic_ operations
> to update the amount of new data available. The problem I'm noticing
> is that when two domains are concurrently updating this variable,
> the value becomes inconsistent leading me to believe that the
> atomic_ operations might not guarantee atomicity between domains. I
> haven't been able to repeat any behaviour like this when I limit the
> two guests to the same physical CPU and eliminate parallelism.
>
> Would anyone be able fill me in if I'm missing something? Are the
> atomic_ operations 100% foolproof for this sort of thing? If not,
> what would be the best approach to use instead?
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
--
Juergen Gross Principal Developer
IP SW OS6 Telephone: +49 (0) 89 636 47950
Fujitsu Siemens Computers e-mail: juergen.gross@fujitsu-siemens.com
Otto-Hahn-Ring 6 Internet: www.fujitsu-siemens.com
D-81739 Muenchen Company details: www.fujitsu-siemens.com/imprint.html
next prev parent reply other threads:[~2009-03-26 7:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 0:17 Atomic operations Timothy Hayes
2009-03-26 7:25 ` Keir Fraser
2009-03-26 7:34 ` Juergen Gross [this message]
2009-03-26 7:50 ` Keir Fraser
2009-03-27 17:22 ` Timothy Hayes
2009-03-27 17:56 ` Keir Fraser
2009-03-27 20:00 ` Timothy Hayes
-- strict thread matches above, loose matches on Subject: below --
2013-02-24 9:42 atomic operations Shraddha Kamat
2013-02-24 10:50 ` richard -rw- weinberger
2013-02-24 23:24 ` Valdis.Kletnieks at vt.edu
2013-02-24 12:50 ` Peter Teoh
2013-02-24 12:53 ` Peter Teoh
2013-02-25 7:15 ` Kumar amit mehta
2013-03-01 5:44 ` Arun KS
2002-06-04 9:23 Atomic operations Gregory Giguashvili
2002-06-03 19:09 Gregory Giguashvili
2002-06-03 18:43 ` H. Peter Anvin
2002-06-03 15:58 Gregory Giguashvili
2002-06-03 15:04 Gregory Giguashvili
2002-06-03 17:27 ` H. Peter Anvin
2002-06-03 18:08 ` Richard B. Johnson
2002-06-03 19:36 ` Thunder from the hill
2002-06-03 21:30 ` Richard B. Johnson
2002-06-03 18:39 ` Brian Gerst
2002-06-03 19:49 ` H. Peter Anvin
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=49CB3000.3080208@fujitsu-siemens.com \
--to=juergen.gross@fujitsu-siemens.com \
--cc=hayesti@tcd.ie \
--cc=keir.fraser@eu.citrix.com \
--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.