mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	"Russell King" <linux@arm.linux.org.uk>
Subject: Re: [RFC][PATCH] ring-buffer: Replace this_cpu_{read,write} with this_cpu_ptr()
Date: Tue, 17 Mar 2015 00:56:51 -0500 (CDT)	[thread overview]
Message-ID: <alpine.DEB.2.11.1503170049300.9309@gentwo.org> (raw)
In-Reply-To: <20150316173154.537b80ee@gandalf.local.home>

On Mon, 16 Mar 2015, Steven Rostedt wrote:

> It has come to my attention that this_cpu_read/write are horrible on
> architectures other than x86. Worse yet, they actually disable
> preemption or interrupts! This caused some unexpected tracing results
> on ARM.

Well its just been 7 years or so. Took a long time it seems.

These would need to be implemented on the architectures to
have comparable performance.

> I may go and remove all this_cpu_read,write() calls from my code
> because of this.

You could do that with __this_cpo_* but not this_cpu_*(). Doing
it to this_cpu_* would make the operations no longer per cpu atomic. If
they do not need per cpu atomicity then you could have used __this_cpu_*
instead. And  __this_cpu_* do not disable preemption or interrupts.

So please do not send patches based on gut reactions.

NAK


  reply	other threads:[~2015-03-17  5:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 21:31 Steven Rostedt
2015-03-17  5:56 ` Christoph Lameter [this message]
2015-03-17 12:13   ` Steven Rostedt
2015-03-17 14:11     ` Steven Rostedt
2015-03-17 14:40       ` [PATCH v2] ring-buffer: Replace this_cpu_*() with __this_cpu_*() Steven Rostedt
2015-03-17 14:47         ` Uwe Kleine-König
2015-03-17 15:07           ` Steven Rostedt
2015-03-19 16:20             ` Christoph Lameter
2015-03-19 16:31               ` Steven Rostedt
2015-03-19 16:33               ` Christoph Lameter
2015-03-19 16:40                 ` Steven Rostedt
2015-03-24 18:49                   ` Christoph Lameter
2015-03-19 16:19       ` [RFC][PATCH] ring-buffer: Replace this_cpu_{read,write} with this_cpu_ptr() Christoph Lameter

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=alpine.DEB.2.11.1503170049300.9309@gentwo.org \
    --to=cl@linux.com \
    --cc=hpa@zytor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /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®