LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Patrick McHardy <kaber@trash.net>,
Netdev <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [RFC PATCH 3/8] [NET]: uninline dev_alloc_skb, de-bloats a lot
Date: Wed, 12 Mar 2008 17:27:16 +0200 (EET) [thread overview]
Message-ID: <Pine.LNX.4.64.0803121711400.24534@kivilampi-30.cs.helsinki.fi> (raw)
In-Reply-To: <Pine.LNX.4.64.0802202135080.32171@kivilampi-30.cs.helsinki.fi>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1798 bytes --]
On Thu, 21 Feb 2008, Ilpo Järvinen wrote:
> On Wed, 20 Feb 2008, Jan Engelhardt wrote:
>
> > On Feb 20 2008 17:27, Patrick McHardy wrote:
> >
> > > __dev_alloc_skb() is also an inline function which performs
> > > some extra work. Which raises the question - if dev_alloc_skb()
> >
> > I'd like to see the results when {__dev_alloc_skb is externed
> > and dev_alloc_skb remains inlined}.
>
> The results are right under your nose already... ;-)
> See from the list of the series introduction:
>
> http://marc.info/?l=linux-netdev&m=120351526210711&w=2
>
> IMHO more interesting number (which I currently don't have) is the
> _remaining_ benefits of uninlining __dev_alloc_skb after
> dev_alloc_skb was first uninlined.
I've measured this now... Without many debug CONFIGs (in v2.6.25-rc2-mm1),
the dev_alloc_skb is much less than 23kB:
382 funcs, 157 +, 12335 -, diff: -12178 --- dev_alloc_skb
dev_alloc_skb | +37
...and on top of that, I got only this:
48 funcs, 111 +, 836 -, diff: -725 --- __dev_alloc_skb
Not that impressive compared with many much worse cases (wasn't a big
surprise because there were fewer callsites for the latter).
Anyway, would I uninline it (or one some another function that has such
two variants that are good candidates for uninlining), should I try to
avoid deepening the call-chain by two functions? To me it seems that only
way to fool gcc to do that for sure would be using some trick like this:
Rename __dev_alloc_skb to ___dev_alloc_skb in the header (with appropriate
don't ever call this due to bloat comment added) and both __dev_alloc_skb
and dev_alloc_skb could then be made to call that one in .c file.
Otherwise I'm not that sure gcc wouldn't try to be too clever if I just
use inline in .c file.
--
i.
next prev parent reply other threads:[~2008-03-12 15:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-20 13:47 [RFC PATCH 0/8]: uninline & uninline Ilpo Järvinen
2008-02-20 13:47 ` [RFC PATCH 1/8] [NET]: uninline skb_put, de-bloats a lot Ilpo Järvinen
2008-02-20 13:47 ` [RFC PATCH 2/8] [NET]: uninline skb_pull, " Ilpo Järvinen
2008-02-20 13:47 ` [RFC PATCH 3/8] [NET]: uninline dev_alloc_skb, " Ilpo Järvinen
2008-02-20 13:47 ` [RFC PATCH 4/8] [NET]: uninline skb_push, " Ilpo Järvinen
2008-02-20 13:47 ` [RFC PATCH 5/8] [NET]: uninline dst_release Ilpo Järvinen
2008-02-20 13:47 ` [RFC PATCH 6/8] [NET]: uninline skb_trim, de-bloats Ilpo Järvinen
2008-02-20 13:47 ` [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf Ilpo Järvinen
2008-02-20 13:47 ` [RFC PATCH 8/8] Jhash in too big for inlining, move under lib/ Ilpo Järvinen
2008-02-23 8:02 ` Andrew Morton
2008-02-23 10:05 ` Ilpo Järvinen
2008-02-23 18:21 ` Andrew Morton
2008-02-23 13:06 ` Andi Kleen
2008-02-20 22:16 ` [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf Vlad Yasevich
2008-02-20 22:34 ` Ilpo Järvinen
2008-02-21 15:27 ` Vlad Yasevich
2008-02-20 16:19 ` [RFC PATCH 3/8] [NET]: uninline dev_alloc_skb, de-bloats a lot Jan Engelhardt
2008-02-20 16:27 ` Patrick McHardy
2008-02-20 16:30 ` Jan Engelhardt
2008-02-20 22:18 ` Ilpo Järvinen
2008-03-12 15:27 ` Ilpo Järvinen [this message]
2008-02-20 13:54 ` [RFC PATCH 1/8] [NET]: uninline skb_put, " Patrick McHardy
2008-02-20 13:57 ` Eric Dumazet
2008-02-23 8:02 ` [RFC PATCH 0/8]: uninline & uninline Andrew Morton
2008-02-23 10:11 ` Ilpo Järvinen
2008-02-23 13:15 ` Andi Kleen
2008-02-23 18:06 ` Ilpo Järvinen
2008-02-23 18:55 ` Andrew Morton
2008-02-23 19:58 ` Hua Zhong
2008-02-23 21:02 ` Andi Kleen
2008-02-27 19:08 ` profile-likely patch (was " Valdis.Kletnieks
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=Pine.LNX.4.64.0803121711400.24534@kivilampi-30.cs.helsinki.fi \
--to=ilpo.jarvinen@helsinki.fi \
--cc=acme@redhat.com \
--cc=davem@davemloft.net \
--cc=jengelh@computergmbh.de \
--cc=kaber@trash.net \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).