Re: [RFC PATCH 8/8] Jhash in too big for inlining, move under lib/

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Saturday, February 23, 2008 - 6:06 am

Andrew Morton <akpm@linux-foundation.org> writes:

For very small functions like this own modules are quite expensive. First  
everything gets rounded up to at least one 4K page (or worse on architectures
with larger pages). That just wastes some memory. 

But then since modules live in vmalloc space they also need an own 
TLB entry, which are notouriously scarce in the kernel because often user space
wants to monopolize them all. So if you're unlucky and user space
is thrashing the TLB just a single call to this hash function will be an own 
TLB miss and quite expensive.

It would be better to just always link it in for this case.

-Andi
--
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, 6:47 am)
[RFC PATCH 1/8] [NET]: uninline skb_put, de-bloats a lot, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 2/8] [NET]: uninline skb_pull, de-bloats a lot, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 4/8] [NET]: uninline skb_push, de-bloats a lot, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 5/8] [NET]: uninline dst_release, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 6/8] [NET]: uninline skb_trim, de-bloats, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
[RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Ilpo Järvinen, (Wed Feb 20, 6:47 am)
Re: [RFC PATCH 1/8] [NET]: uninline skb_put, de-bloats a lot, Patrick McHardy, (Wed Feb 20, 6:54 am)
Re: [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Vlad Yasevich, (Wed Feb 20, 3:16 pm)
Re: [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Ilpo Järvinen, (Wed Feb 20, 3:34 pm)
Re: [RFC PATCH 7/8] [SCTP]: uninline sctp_add_cmd_sf, Vlad Yasevich, (Thu Feb 21, 8:27 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andrew Morton, (Sat Feb 23, 1:02 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Ilpo Järvinen, (Sat Feb 23, 3:11 am)
Re: [RFC PATCH 8/8] Jhash in too big for inlining, move un ..., Andi Kleen, (Sat Feb 23, 6:06 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andi Kleen, (Sat Feb 23, 6:15 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Ilpo Järvinen, (Sat Feb 23, 11:06 am)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andrew Morton, (Sat Feb 23, 11:55 am)
RE: [RFC PATCH 0/8]: uninline &amp; uninline, Hua Zhong, (Sat Feb 23, 12:58 pm)
Re: [RFC PATCH 0/8]: uninline &amp; uninline, Andi Kleen, (Sat Feb 23, 2:02 pm)