lkml.org 
[lkml]   [2015]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: net-scm: Macro for special pattern?
From
Date
On Wed, 2015-11-18 at 08:45 +0100, SF Markus Elfring wrote:
> > You mean this likely() annotation of yours?
>
> How do you think about to express the software design pattern
> which is applied at the mentioned source code place by a dedicated
> preprocessor macro?

likely()/unlikely() are not always applicable.

In the Ipv6 case I mentioned to you, it all depends if an application
for some reason absolutely wants the sockets to store the extra skb

There are seldom used socket options. _if_/_when_ they are used, a
likely()/unlikely() would give the wrong signal.

likely() should only be used in contexts we know better than branch
predictor/compiler.





\
 
 \ /
  Last update: 2015-11-18 14:01    [W:0.895 / U:1.276 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site