Re: [patch 0/3] Allow inlined spinlocks again V3

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

 




On Fri, 14 Aug 2009, Heiko Carstens wrote:
> 
> However quite a few of the additional function calls in networking code
> come from uninlining:
> 
> c2aa270a [NET]: uninline skb_push, de-bloats a lot
> 6be8ac2f [NET]: uninline skb_pull, de-bloats a lot
> 419ae74e [NET]: uninline skb_trim, de-bloats

Hmm. Those functions are big only because of the stupid debugging, which 
is almost certainly not worth it any more. I doubt people have seen enough 
skb under/over-flows in the last years to merit the code.

I suspect we should remove the silly skb_under/over_panic functions, and 
do

 - skb_put:
	-       if (unlikely(skb->tail > skb->end))
	-               skb_over_panic(skb, len, __builtin_return_address(0));
	+       BUG_ON(skb->tail > skb->end);

 - skb_push:
	-       if (unlikely(skb->data<skb->head))
	-               skb_under_panic(skb, len, __builtin_return_address(0));
	+       BUG_ON(skb->data < skb->head);

at which point it might be worthwhile to inline them again, because the 
footprint of a BUG_ON() is really fairly small.

If this is a big deal on s390, it might be worth it.

			Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux