Netdev List
 help / color / mirror / Atom feed
From: Krishna Kumar <krkumar2@in.ibm.com>
To: netdev@vger.kernel.org
Cc: krkumar2@in.ibm.com, Krishna Kumar <krkumar2@in.ibm.com>
Subject: [PATCH] core: Call net_tx_action only if work pending
Date: Tue, 08 May 2007 13:01:30 +0530	[thread overview]
Message-ID: <20070508073130.17546.91346.sendpatchset@localhost.localdomain> (raw)

Optimize call to net_tx_action only if work is pending.

Patch against net-2.6.22.git

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---
diff -ruNp org/net/core/dev.c new/net/core/dev.c
--- org/net/core/dev.c	2007-04-09 12:43:15.000000000 +0530
+++ new/net/core/dev.c	2007-04-09 12:43:42.000000000 +0530
@@ -3474,7 +3474,8 @@ static int dev_cpu_callback(struct notif
 	*list_net = oldsd->output_queue;
 	oldsd->output_queue = NULL;
 
-	raise_softirq_irqoff(NET_TX_SOFTIRQ);
+	if (sd->completion_queue || sd->output_queue)
+		raise_softirq_irqoff(NET_TX_SOFTIRQ);
 	local_irq_enable();
 
 	/* Process offline CPU's input_pkt_queue */

             reply	other threads:[~2007-05-08  7:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08  7:31 Krishna Kumar [this message]
2007-05-09  1:59 ` [PATCH] core: Call net_tx_action only if work pending David Miller
2007-05-09  4:24   ` Krishna Kumar2

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=20070508073130.17546.91346.sendpatchset@localhost.localdomain \
    --to=krkumar2@in.ibm.com \
    --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