lkml.org 
[lkml]   [2019]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next] net: Drop unlikely before IS_ERR(_OR_NULL)
From
Date

On 2019/6/6 0:13, Jesse Brandeburg wrote:
> On Wed, 5 Jun 2019 22:24:26 +0800 Kefeng wrote:
>> IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag,
>> so no need to do that again from its callers. Drop it.
>>
> <snip>
>
>> segs = __skb_gso_segment(skb, features, false);
>> - if (unlikely(IS_ERR_OR_NULL(segs))) {
>> + if (IS_ERR_OR_NULL(segs)) {
>> int segs_nr = skb_shinfo(skb)->gso_segs;
>>
> The change itself seems reasonable, but did you check to see if the
> paths changed are faster/slower with your fix? Did you look at any
> assembly output to see if the compiler actually generated different
> code? Is there a set of similar changes somewhere else in the kernel
> we can refer to?

+Enrico Weigelt

There is no different in assembly output (only check the x86/arm64), and

the Enrico Weigelt have finished a cocci script to do this cleanup.


>
> I'm not sure in the end that the change is worth it, so would like you
> to prove it is, unless davem overrides me. :-)
>
>
> .
>

\
 
 \ /
  Last update: 2019-06-06 03:44    [W:0.081 / U:9.492 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site