mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	Avi Kivity <avi@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH] tracepoints: Move the work out of line from hotpath sections
Date: Thu, 09 Aug 2012 18:25:31 -0400	[thread overview]
Message-ID: <1344551131.6935.90.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20120809205053.GB15109@Krystal>

On Thu, 2012-08-09 at 16:50 -0400, Mathieu Desnoyers wrote:

> I guess the very first thing to do would be to benchmark this patch
> thoroughly to see if it brings significant performance improvements to
> the "tracing built-in, not enabled" case. If it does bring a significant
> improvement, then we can consider the overhead on tracing, and see if it
> makes sense to add this extra indirection on the tracing hot path.

I know you and your customers focus a lot on tracing. But if there is a
decent improvement with the 'off' case, then I think that's rational
enough for such a change. Remember, tracing is always a second class
citizen to kernel performance.

But I agree that this change is probably not worth it if it's just a
slight performance.

> 
> About your "Pro" point "Less code in the hot paths", it remains to be
> seen, overall, how many bytes of the removed instructions actually sit
> on hot cache lines and if there is any effect on the TLB, especially
> given that this "maybe-not-so-hot" code is in an unlikely branch.

This is why I posted the patch now. I don't have any real good
measurements for performance testing. It showed some improvement with
hackbench, but hackbench is very unreliable for such tests. I'm hoping
others will run it under their work loads to see how things improve.

> 
> It might be better to improve gcc to move really cold branches out of
> line (really, really far away), and use the compiler to do this, rather
> than to use an extra indirection that adds bloat and complexity to the
> kernel.

I think modifying gcc is something that can help more than tracing. But
that's been a pipe dream for such a long time that I've started dreaming
about winning a gold medal in the Olympics instead. Standing on the
podium listening to the crowd chanting your name along with your country
is more fun to dream about than seeing your unlikely code stop becoming
hurdles for the CPU sprinters.

Yes, I had a bit of Olympic overdose lately.

-- Steve



  reply	other threads:[~2012-08-09 22:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 20:40 Steven Rostedt
2012-08-09 20:50 ` Mathieu Desnoyers
2012-08-09 22:25   ` Steven Rostedt [this message]
2012-08-09 23:16     ` H. Peter Anvin
2012-08-09 23:54       ` David Daney
2012-08-10  1:41         ` Steven Rostedt
2012-08-10  2:05           ` Mathieu Desnoyers
2012-08-10  3:09             ` 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=1344551131.6935.90.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=avi@redhat.com \
    --cc=hch@infradead.org \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@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

all inboxes | Powered by JetHome®