mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Huang Ying <ying.huang@intel.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Theodore Tso <tytso@mit.edu>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Mathieu Desnoyers <compudj@krystal.dyndns.org>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	"Martin J. Bligh" <mbligh@mbligh.org>,
	Christoph Hellwig <hch@infradead.org>,
	Li Zefan <lizf@cn.fujitsu.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
	Masami Hiramatsu <mhiramat@redhat.com>
Subject: Re: [PATCH 3/3] ring-buffer: add design document
Date: Thu, 11 Jun 2009 08:51:07 +0800	[thread overview]
Message-ID: <1244681467.8361.654.camel@yhuang-dev.sh.intel.com> (raw)
In-Reply-To: <20090610195525.429316815@goodmis.org>

On Thu, 2009-06-11 at 03:53 +0800, Steven Rostedt wrote:
> +
> +cmpxchg - hardware assisted atomic transaction that performs the following:
> +
> +   A = B iff previous A == C
> +
> +   R = cmpxchg(A, C, B) is saying that we replace A with B if and only if
> +      current A is equal to C, and we put the old (current) A into R
> +
> +   R gets the previous A regardless if A is updated with B or not.
> +
> +   To see if the update was successful a compare of R == C may be used.

As far as I know, some architectures have no hardware assisted (NMI
safe) cmpxchg. Is it OK to use cmpxchg in architecture-independent code?

Best Regards,
Huang Ying



  parent reply	other threads:[~2009-06-11  0:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 19:53 [PATCH 0/3] [GIT PULL][for 2.6.32] lockless ring buffer Steven Rostedt
2009-06-10 19:53 ` [PATCH 1/3] ring-buffer: make the buffer a true circular link list Steven Rostedt
2009-06-11  1:12   ` Lai Jiangshan
2009-06-11  2:00     ` Steven Rostedt
2009-06-11  3:25       ` Lai Jiangshan
2009-06-11  3:35         ` Steven Rostedt
2009-06-10 19:53 ` [PATCH 2/3] ring-buffer: make lockless Steven Rostedt
2009-06-10 19:53 ` [PATCH 3/3] ring-buffer: add design document Steven Rostedt
2009-06-10 22:13   ` Mathieu Desnoyers
2009-06-11  1:55     ` Steven Rostedt
2009-06-11  3:51       ` Mathieu Desnoyers
2009-06-11  3:59         ` Mathieu Desnoyers
2009-06-11  4:15           ` Steven Rostedt
2009-06-11 18:09             ` Mathieu Desnoyers
2009-06-11  0:51   ` Huang Ying [this message]
2009-06-11  0:54     ` H. Peter Anvin
2009-06-11  1:58     ` Steven Rostedt
2009-06-11  2:33       ` Huang Ying
2009-06-11  2:38         ` Mathieu Desnoyers
2009-06-12  3:13           ` Huang Ying
2009-06-12  3:46             ` H. Peter Anvin
2009-06-11  3:15   ` Hidetoshi Seto
2009-06-11  3:25     ` Steven Rostedt
2009-06-13  1:54   ` Frederic Weisbecker
2009-06-13  2:16     ` Steven Rostedt
2009-06-13 22:36       ` Frederic Weisbecker
2009-06-14 12:39         ` Steven Rostedt
2009-06-15  0:05           ` Frederic Weisbecker
2009-06-15  0:56   ` Frederic Weisbecker
2009-07-08 20:13 [PATCH 0/3] [GIT PULL] rebase of lockless ring buffer Steven Rostedt
2009-07-08 20:13 ` [PATCH 3/3] ring-buffer: add design document Steven Rostedt

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=1244681467.8361.654.camel@yhuang-dev.sh.intel.com \
    --to=ying.huang@intel.com \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=compudj@krystal.dyndns.org \
    --cc=fweisbec@gmail.com \
    --cc=hch@infradead.org \
    --cc=hpa@zytor.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mbligh@mbligh.org \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    --cc=tglx@linutronix.de \
    --cc=tytso@mit.edu \
    /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

all inboxes | Powered by JetHome®