From: "Kris Katterjohn" <kjak@ispwest.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Merge __load_pointer() and load_pointer() in net/core/filter.c; kernel 2.6.14
Date: Wed, 2 Nov 2005 21:51:23 -0800 [thread overview]
Message-ID: <a323eed56c0f4695bec595264cddc4a2.kjak@ispwest.com> (raw)
From: Mitchell Blank Jr
> > Kris Katterjohn wrote:
> > Forgive me because this is one of my first attempts at anything related to the
> > kernel, but...
> >
> > 1) How would I go about benchmarking this?
>
> The first thing to do is run "size net/core/filter.o" before and after and
> see if your change makes the "text" section larger.
>
> The risk of putting more stuff into the inlined function is just that
> the rarely-executed path will end up duplicated in a bunch of places, bloating
> the generated code. It's hard to directly benchmark the effects of this but
> it will generally make the fast-path code less compact in the L1 I-cache
> which (if you do it enough) slows everything down. Thats one reason why
> kernel developers try to keep a close eye on bloat.
>
> -Mitch
Before patch:
text data bss dec hex filename
2399 0 0 2399 95f x/net/core/filter.o
After patch:
text data bss dec hex filename
2589 0 0 2589 a1d y/net/core/filter.o
After patch without inlining the function:
text data bss dec hex filename
2127 0 0 2127 84f y/net/core/filter.o
So I guess use my patch and take "inline" off? What do you think?
Thanks
next reply other threads:[~2005-11-03 5:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-03 5:51 Kris Katterjohn [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-11-03 18:13 [PATCH] Merge __load_pointer() and load_pointer() in net/core/filter.c;kernel 2.6.14 Kris Katterjohn
2005-11-03 6:19 [PATCH] Merge __load_pointer() and load_pointer() in net/core/filter.c; kernel 2.6.14 Kris Katterjohn
2005-11-03 6:58 ` Mitchell Blank Jr
2005-11-03 16:19 ` Patrick McHardy
2005-11-03 2:48 Kris Katterjohn
2005-11-03 2:13 Kris Katterjohn
2005-11-03 2:30 ` Herbert Xu
2005-11-02 8:41 Kris Katterjohn
2005-11-03 1:50 ` Herbert Xu
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=a323eed56c0f4695bec595264cddc4a2.kjak@ispwest.com \
--to=kjak@ispwest.com \
--cc=kjak@users.sourceforge.net \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®