[Devel] Re: [PATCH net-2.6.25 1/3] Uninline the __inet_hash function

Eric Dumazet dada1 at cosmosbay.com
Wed Dec 19 09:15:20 PST 2007


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
> 
> 




More information about the Devel mailing list