lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4EF176F1.1080802@linux.vnet.ibm.com>
Date:	Wed, 21 Dec 2011 14:04:33 +0800
From:	Michael Wang <wangyun@...ux.vnet.ibm.com>
To:	David Miller <davem@...emloft.net>
CC:	netdev@...r.kernel.org
Subject: Re: [PATCH] Avoid extra calculation in ip_route_input_common

On 12/21/2011 01:57 PM, David Miller wrote:

> From: Michael Wang <wangyun@...ux.vnet.ibm.com>
> Date: Wed, 21 Dec 2011 13:12:03 +0800
> 
>> From: Michael Wang <wangyun@...ux.vnet.ibm.com>
>>
>> If previous condition doesn't meet, the later check will be cancelled.
>> So we don't need to do all the calculation.
>>
>> Signed-off-by: Michael Wang <wangyun@...ux.vnet.ibm.com>
> 
> This is intentional to reduce the number of branch prediction
> misses, please don't change this.
> 
> Once we read one of these values, the rest are incredibly cheap,
> the real cost is if we have tons of real branches here, each
> of which can be mispredicted.
> 

Hi, David

Thanks for your detailed explain, now I know the reason we use this style :)

Thanks,
Michael Wang

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ