[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20111221.005758.556186611596801704.davem@davemloft.net>
Date: Wed, 21 Dec 2011 00:57:58 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: wangyun@...ux.vnet.ibm.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] Avoid extra calculation in ip_route_input_common
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.
--
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