Re: [RFC PATCH 3/8] [NET]: uninline dev_alloc_skb, de-bloats a lot

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jan Engelhardt <jengelh@...>
Cc: Patrick McHardy <kaber@...>, Netdev <netdev@...>, LKML <linux-kernel@...>, David Miller <davem@...>, Arnaldo Carvalho de Melo <acme@...>
Date: Wednesday, February 20, 2008 - 6:18 pm

On Wed, 20 Feb 2008, Jan Engelhardt wrote:


I think you misunderstood the results, if I uninlined dev_alloc_skb(), it 
_alone_ was uninlined which basically means that __dev_alloc_skb() that is 
inline as well is included inside that uninlined function.

When both were inlined, they add up to everywhere, and uninlining 
dev_alloc_skb alone mitigates that for both(!) of them in every place 
where dev_alloc_skb is being called. Because __dev_alloc_skb call sites 
are few, most benefits show up already with dev_alloc_skb uninlining 
alone. On the other hand, if __dev_alloc_skb is uninlined, the size 
reasoning you used above applies to dev_alloc_skb callsites, and that
is definately less than 23kB.


Of course that could be done as well, however, I wouldn't be too keen to 
deepen callchain by both of them, ie., uninlined dev_alloc_skb would just 
contain few bytes which perform the call to __dev_alloc_skb which has the 
bit larger content due to that "extra work". IMHO the best solution would 
duplicate the "extra work" to both of them on binary level (obviously 
not on the source level), e.g., by adding static inline ___dev_alloc_skb() 
to .h which is inlined to both of the variants. I'm not too sure if inline 
to __dev_alloc_skb() alone is enough in .c file to result in inlining of 
__dev_alloc_skb to dev_alloc_skb (with all gcc versions and relevant 
optimization settings).


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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 0/8]: uninline &amp; uninline, Ilpo Järvinen, (Wed Feb 20, 9:47 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andrew Morton, (Sat Feb 23, 4:02 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andi Kleen, (Sat Feb 23, 9:15 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andrew Morton, (Sat Feb 23, 2:55 pm)
RE: [RFC PATCH 0/8]: uninline &amp; uninline, Hua Zhong, (Sat Feb 23, 3:58 pm)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andi Kleen, (Sat Feb 23, 5:02 pm)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Ilpo Järvinen, (Sat Feb 23, 2:06 pm)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Ilpo Järvinen, (Sat Feb 23, 6:11 am)
[RFC PATCH 1/8] [NET]: uninline skb_put, de-bloats a lot, Ilpo Järvinen, (Wed Feb 20, 9:47 am)
Re: [RFC PATCH 1/8] [NET]: uninline skb_put, de-bloats a lot, Patrick McHardy, (Wed Feb 20, 9:54 am)
[RFC PATCH 2/8] [NET]: uninline skb_pull, de-bloats a lot, Ilpo Järvinen, (Wed Feb 20, 9:47 am)
Re: [RFC PATCH 3/8] [NET]: uninline dev_alloc_skb, de-bloats..., Ilpo Järvinen, (Wed Feb 20, 6:18 pm)
[RFC PATCH 4/8] [NET]: uninline skb_push, de-bloats a lot, Ilpo Järvinen, (Wed Feb 20, 9:47 am)
[RFC PATCH 5/8] [NET]: uninline dst_release, Ilpo Järvinen, (Wed Feb 20, 9:47 am)
[RFC PATCH 6/8] [NET]: uninline skb_trim, de-bloats, Ilpo Järvinen, (Wed Feb 20, 9:47 am)
[RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Ilpo Järvinen, (Wed Feb 20, 9:47 am)
Re: [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Vlad Yasevich, (Wed Feb 20, 6:16 pm)
Re: [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Ilpo Järvinen, (Wed Feb 20, 6:34 pm)
Re: [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Vlad Yasevich, (Thu Feb 21, 11:27 am)