lkml.org 
[lkml]   [2005]   [Nov]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From"Kris Katterjohn" <>
SubjectRe: [PATCH] Merge __load_pointer() and load_pointer() in net/core/filter.c; kernel 2.6.14
DateWed, 2 Nov 2005 21:51:23 -0800
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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-03 06:55    [from the cache]
©2003-2008