OpenVZ Forum


Home » Mailing lists » Devel » [PATCH net-2.6.25 1/3] Uninline the __inet_hash function
Re: [PATCH net-2.6.25 1/3] Uninline the __inet_hash function [message #25304 is a reply to message #25303] Wed, 19 December 2007 17:15 Go to previous messageGo to previous message
Eric Dumazet is currently offline  Eric Dumazet
Messages: 36
Registered: July 2006
Member
Pavel Emelyanov a écrit :
> Eric Dumazet wrote:
>> Pavel Emelyanov a écrit :
>>> Eric Dumazet wrote:
>>>> If you un-inline this (good idea), I am not sure we still need listen_possible 
>>>> argument.
>>>>
>>>> It was usefull only to help compiler to zap dead code (since it was known at 
>>>> compile time), now it only adds some extra test and argument passing.
>>> Hm... I've tried to address this issue and got worse result - minus
>>> 600 bytes (vs minus 725). So, what would be more preferable - get a 
>>> smaller code with one extra 'if' or get a bit larger code without it?
>>>
>> Strange... What I meant is always assume listen_possible is true.
> 
> That's not truth, if I get you right. The __inet_hash() is called
> with 0, from all the places except for the inet_hash() one.

OK, but on cases with 0, sk->sk_state is != TCP_LISTEN, unless I am mistaken.


> 
>> The if (sk->sk_state == TCP_LISTEN) will finally see the truth.
>>
>> I did a test here on x86 gcc-4.2.2 and saved 32 bytes.
>>
>>
>>
> 
> Thanks,
> Pavel
> 
>
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: netlink compat for ipt_ULOG
Next Topic: [PATCH net-2.6.25 2/3] Uninline the __inet_lookup_established function
Goto Forum:
  


Current Time: Thu Aug 21 17:58:06 GMT 2025

Total time taken to generate the page: 0.05305 seconds