Re: [PATCH] Merge __load_pointer() and load_pointer() in net/core/filter.c; kernel 2.6.14

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux