public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Adrian Bunk <bunk@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux arch <linux-arch@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH] prepare kconfig inline optimization for all architectures
Date: Sun, 27 Apr 2008 20:09:57 +0200	[thread overview]
Message-ID: <20080427180957.GA25964@uranus.ravnborg.org> (raw)
In-Reply-To: <20080427180007.GB28483@infradead.org>

On Sun, Apr 27, 2008 at 02:00:07PM -0400, Christoph Hellwig wrote:
> On Sun, Apr 27, 2008 at 08:47:14PM +0300, Adrian Bunk wrote:
> > What I want instead:
> > - we continue to force the compiler to always inline with "inline"
> > - we remove the inline's in .c files and make too big functions in 
> >   headers out-of-line
> 
> It doesn't matter whether we use inline or always_inline to force
> inlining of a function, that's just syntactical sugar.

inline => the developer hints the compiler that it may
          be a good idea to inline this function

always_inline => the developer tell gcc that for some obscure reasons
                 MUST always inline uses of this function

> What is rather
> annoying is that with the config option we'd have something marked
> inline without actually meaning it's inline.
With the config option we pass the inline hint to gcc (if enabled).
So with the config option we have the possibility to pass a _hint_ to
gcc about inlining.

Before the config option there were no difference between
static int alwyas_inline foo() {}
and
static int inline foo() {}

With the config option we now have a situation where they actually
differ as they should do (assuming gcc > 4.x).

> And what's even worse
> is that this is depending on a user-visible config option which is
> entirely stupid.
So you say that it is safe to assume all places where we really need
always_inline are annotedted such - and we do not need a simple
config option that the user can uncheck.
Fine by me - I prefer the simpler solution.

	Sam

  reply	other threads:[~2008-04-27 18:09 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 10:51 [PATCH] prepare kconfig inline optimization for all architectures Sam Ravnborg
2008-04-27 11:31 ` Adrian Bunk
2008-04-27 11:56   ` Sam Ravnborg
2008-04-27 12:36     ` Ingo Molnar
2008-04-27 12:49       ` Ingo Molnar
2008-04-27 17:06   ` Linus Torvalds
2008-04-27 17:22     ` Adrian Bunk
2008-04-27 17:32       ` Linus Torvalds
2008-04-27 17:47         ` Adrian Bunk
2008-04-27 18:00           ` Christoph Hellwig
2008-04-27 18:09             ` Sam Ravnborg [this message]
2008-04-27 18:14               ` Christoph Hellwig
2008-04-27 18:24                 ` Linus Torvalds
2008-04-27 18:32                   ` Christoph Hellwig
2008-04-27 19:36                   ` Ingo Molnar
2008-04-27 19:49                     ` Adrian Bunk
2008-04-27 23:26                   ` Arjan van de Ven
2008-04-27 23:36                     ` Linus Torvalds
2008-04-27 23:41                       ` Ingo Molnar
2008-04-27 18:31                 ` Sam Ravnborg
2008-04-27 18:36                   ` Christoph Hellwig
2008-04-27 18:11           ` Linus Torvalds
2008-04-27 18:25             ` Christoph Hellwig
2008-04-27 18:30               ` Linus Torvalds
2008-04-27 18:41             ` Adrian Bunk
2008-04-27 18:57               ` Linus Torvalds
2008-04-27 20:51           ` Mike Galbraith
2008-04-27 17:57         ` Christoph Hellwig
2008-04-27 17:40       ` Matthew Wilcox
2008-04-27 17:59         ` Adrian Bunk

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=20080427180957.GA25964@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=bunk@kernel.org \
    --cc=davem@davemloft.net \
    --cc=hch@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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