Netdev List
 help / color / mirror / Atom feed
From: Hua Zhong <hzhong@gmail.com>
To: davem@savemloft.net, netdev@vger.kernel.org
Subject: [PATCH] remove likely in ip_rcv_finish()
Date: Tue, 25 Apr 2006 02:10:27 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0604250204470.4481@localhost.localdomain> (raw)

Hi,

This is another result from my likely profiling tool (dwalker@mvista.com just sent the patch of the profiling tool to linux-kernel mailing list, which is similar to what I use).

On my system (not very busy, normal development machine within a VMWare workstation), I see a 6/5 miss/hit ratio for the following "likely".

I am not sure what would happen for a busy system though (on which performance actually matters), but I am just reporting what I find and hope it might help.

Signed-off-by: Hua Zhong <hzhong@gmail.com>

diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
index 18d7fad..9f44359 100644
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -337,7 +337,7 @@ static inline int ip_rcv_finish(struct s
  	 *	Initialise the virtual path cache for the packet. It describes
  	 *	how the packet travels inside Linux networking.
  	 */ 
-	if (likely(skb->dst == NULL)) {
+	if (skb->dst) {
  		int err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos,
  					 skb->dev);
  		if (unlikely(err)) {

             reply	other threads:[~2006-04-25  9:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-25  9:10 Hua Zhong [this message]
2006-04-25  9:20 ` FIXED Re: [PATCH] remove likely in ip_rcv_finish() Hua Zhong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0604250204470.4481@localhost.localdomain \
    --to=hzhong@gmail.com \
    --cc=davem@savemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox