All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: jt@hpl.hp.com
Cc: Johannes Berg <johannes@sipsolutions.net>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 7/9] wext: reduce inline abuse
Date: Thu, 26 Apr 2007 19:03:27 +0200	[thread overview]
Message-ID: <200704261903.27932.mb@bu3sch.de> (raw)
In-Reply-To: <20070426165032.GB22576@bougret.hpl.hp.com>

On Thursday 26 April 2007 18:50:32 Jean Tourrilhes wrote:
> On Tue, Apr 24, 2007 at 08:07:39PM +0200, Johannes Berg wrote:
> > This patch removes a bunch of inline abuse from wext. Most functions
> > that were marked inline are only used once so the compiler will inline
> > them anyway, others are used multiple times but there's no requirement
> > for them to be inline since they aren't in any fast paths.
> > 
> > Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> 
> 	That's clearly not true of all compilers. All gcc versions
> before 4.0 need serious help to inline functions used only once. Our
> current minimal requirement for the kernel is gcc 3.2, therefore this
> code is still useful.
> 	Note that this is a legitimate use of inline (tell the
> compiler to inline the function), not an abuse.

By my personal definition _every_ use of inline is abuse, if it's not
in an absolute fastpath and applied to a really tiny function.
Sure, other people have different opinions on that, but I think
with my approach we get smallest code with good speed.
In general I try to avoid inline whereever possible.
I think this patch is OK and should go in.

Often it's even desired to have out of line functions in fastpaths.
See spinlocks.

-- 
Greetings Michael.

  reply	other threads:[~2007-04-26 17:03 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 18:07 [PATCH 0/9] various wext cleanups Johannes Berg
2007-04-24 18:07 ` [PATCH 1/9] wext: move to net/wireless Johannes Berg
2007-04-24 18:07 ` [PATCH 2/9] wext: clean up how wext is called Johannes Berg
2007-04-24 18:07   ` Johannes Berg
2007-04-24 18:07 ` [PATCH 3/9] wext: remove dead debug code Johannes Berg
2007-04-24 18:07   ` Johannes Berg
2007-04-26 16:46   ` Jean Tourrilhes
2007-04-26 16:46     ` Jean Tourrilhes
2007-04-27  0:55     ` John W. Linville
2007-04-27  0:55       ` John W. Linville
2007-04-24 18:07 ` [PATCH 4/9] wext: remove options Johannes Berg
2007-04-24 18:07   ` Johannes Berg
2007-04-24 18:07 ` [PATCH 5/9] wext: cleanup early ioctl call path Johannes Berg
2007-04-24 18:07   ` Johannes Berg
2007-04-24 18:07 ` [PATCH 6/9] wext: move EXPORT_SYMBOL statements where they belong Johannes Berg
2007-04-24 18:07   ` Johannes Berg
2007-04-24 18:07 ` [PATCH 7/9] wext: reduce inline abuse Johannes Berg
2007-04-24 18:07   ` Johannes Berg
2007-04-26 16:50   ` Jean Tourrilhes
2007-04-26 17:03     ` Michael Buesch [this message]
2007-04-26 17:15       ` Jean Tourrilhes
2007-04-26 17:15         ` Jean Tourrilhes
2007-04-26 21:37         ` David Miller
2007-04-26 17:14     ` Johannes Berg
2007-04-26 17:14       ` Johannes Berg
2007-04-24 18:07 ` [PATCH 8/9] wext: misc code cleanups Johannes Berg
2007-04-24 18:07   ` Johannes Berg
2007-04-24 18:07 ` [PATCH 9/9] net_device: dont include wext bits if not required Johannes Berg
2007-04-24 18:07   ` Johannes Berg
2007-04-26 16:53   ` Jean Tourrilhes
2007-04-26 16:53     ` Jean Tourrilhes
2007-04-26 17:08     ` Johannes Berg
2007-04-27  0:50     ` John W. Linville
2007-04-27  0:50       ` John W. Linville
2007-04-26 10:15 ` [PATCH 0/9] various wext cleanups Johannes Berg
2007-04-26 10:15   ` Johannes Berg
2007-04-26 10:18   ` David Miller
2007-04-26 11:05     ` Johannes Berg
2007-04-26 11:05       ` Johannes Berg
2007-04-26 10:19 ` David Miller
2007-04-26 10:19   ` David Miller
2007-04-27  1:12   ` John W. Linville
2007-04-27  1:12     ` John W. Linville
2007-04-27  2:36     ` David Miller
2007-04-27  3:48 ` David Miller

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=200704261903.27932.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=jt@hpl.hp.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.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 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.