All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>, Jason Baron <jbaron@redhat.com>,
	David Daney <ddaney@caviumnetworks.com>,
	rth@redhat.com, "H. Peter Anvin" <hpa@zytor.com>,
	tglx@linutronix.de, andi@firstfloor.org, roland@redhat.com,
	masami.hiramatsu.pt@hitachi.com, fweisbec@gmail.com,
	avi@redhat.com, davem@davemloft.net, vgoyal@redhat.com,
	sam@ravnborg.org, tony@bakeyournoodle.com, dsd@laptop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] jump label: disable due to compiler bug
Date: Fri, 29 Oct 2010 09:35:24 -0400	[thread overview]
Message-ID: <20101029133524.GA23916@Krystal> (raw)
In-Reply-To: <1288356418.18238.454.camel@gandalf.stny.rr.com>

* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Fri, 2010-10-29 at 14:22 +0200, Ingo Molnar wrote:
> > * Steven Rostedt <rostedt@goodmis.org> wrote:
> > 
> > > On Fri, 2010-10-29 at 08:34 +0200, Ingo Molnar wrote:
> 
> > > Do you mean to have it dependent on !EMBEDDED, or perhaps !CC_OPTIMIZE_FOR_SIZE ?
> > 
> > CC_OPTIMIZE_FOR_SIZE dependency probably not. Might even leave out !EMBEDDED, to 
> > make it generally configurable.
> > 
> > Also, we should make it default off - we need to see whether there are any compiler 
> > bugs lurking.
> 
> Ah, so we should then add a:
> 
> config JUMP_LABEL
> 	prompt "Optimize trace point call sites"
> 	depends on HAVE_ARCH_JUMP_LABEL
> 	help
> 	  If it is detected that the compiler has support for
> 	  "asm goto", the kernel will compile trace points locations 
> 	  with just a nop instruction. When trace points are enabled
> 	  the nop will be converted to a jump to the trace function.
> 	  This technique lowers overhead and stress on the branch
> 	  prediction of the processor.
> 
> 	  On i386, the options added to make this work may increase
> 	  the size of the kernel slightly.
> 
> 
> Then in the code have:
> 
> -#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_HAVE_ARCH_JUMP_LABEL)
> +#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_HAVE_ARCH_JUMP_LABEL) \

Technically, you could remove the dependency on
"defined(CONFIG_HAVE_ARCH_JUMP_LABEL)", because it is now dealt with at
the Kconfig level (CONFIG_JUMP_LABEL depends on it).

> +	&& defined(JUMP_LABEL)

this would be defined(CONFIG_JUMP_LABEL)

The rest looks fine,

Thanks,

Mathieu

>  # include <asm/jump_label.h>
>  # define HAVE_JUMP_LABEL
>  #endif
> 
> 
> If you agree, I can write up a patch.
> 
> -- Steve
> 	  
> > 
> > > I can see people making a big stink about adding back a gcc option that makes the 
> > > kernel bigger.
> > 
> > Depends on exactly how much .text we are talking about here. Plus it would be 
> > default-off.
> > 
> > Thanks,
> > 
> > 	Ingo
> 
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

  parent reply	other threads:[~2010-10-29 14:20 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 21:07 [PATCH 0/2] jump label updates Jason Baron
2010-10-27 21:07 ` [PATCH 1/2] move arch_init_ideal_nop5 later Jason Baron
2010-10-27 22:24   ` H. Peter Anvin
2010-10-28  2:11     ` Steven Rostedt
2010-10-28  2:59       ` H. Peter Anvin
2010-10-27 21:07 ` [PATCH 2/2] jump label: disable due to compiler bug Jason Baron
2010-10-27 22:21   ` H. Peter Anvin
2010-10-28 14:17     ` Jason Baron, rth
2010-10-28 18:55       ` David Daney
2010-10-28 20:11         ` Jason Baron
2010-10-29  6:34           ` Ingo Molnar
2010-10-29 12:18             ` Steven Rostedt
2010-10-29 12:22               ` Ingo Molnar
2010-10-29 12:46                 ` Steven Rostedt
2010-10-29 13:10                   ` Ingo Molnar
2010-10-29 13:35                   ` Mathieu Desnoyers [this message]
2010-10-29 16:18                     ` Steven Rostedt
2010-10-29 17:18                       ` David Daney
2010-10-29 17:33                         ` Steven Rostedt
2010-10-29 17:48                           ` David Daney
2010-10-29 18:03                             ` Steven Rostedt
2010-10-29 18:13                             ` Richard Henderson
2010-10-29 18:25                               ` Steven Rostedt
2010-10-29 20:15                           ` H. Peter Anvin
2010-10-29 20:42                             ` Mathieu Desnoyers
2010-10-29 20:47                             ` Steven Rostedt
2010-10-29 20:51                               ` H. Peter Anvin
2010-10-29 20:58                                 ` Steven Rostedt
2010-10-30  7:47                               ` Andi Kleen
2010-10-30 14:00                                 ` Steven Rostedt
2010-10-29 20:05                       ` Mathieu Desnoyers
2010-10-29 20:44                         ` Steven Rostedt
2010-10-29 15:59           ` Richard Henderson
2010-10-27 21:15 ` [PATCH 0/2] jump label updates David Miller
2010-10-28  1:33   ` 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=20101029133524.GA23916@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=andi@firstfloor.org \
    --cc=avi@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ddaney@caviumnetworks.com \
    --cc=dsd@laptop.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=rth@redhat.com \
    --cc=sam@ravnborg.org \
    --cc=tglx@linutronix.de \
    --cc=tony@bakeyournoodle.com \
    --cc=vgoyal@redhat.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.