Netdev List
 help / color / mirror / Atom feed
* [PATCH] core: Call net_tx_action only if work pending
@ 2007-05-08  7:31 Krishna Kumar
  2007-05-09  1:59 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Krishna Kumar @ 2007-05-08  7:31 UTC (permalink / raw)
  To: netdev; +Cc: krkumar2, Krishna Kumar

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 */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-09  4:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-08  7:31 [PATCH] core: Call net_tx_action only if work pending Krishna Kumar
2007-05-09  1:59 ` David Miller
2007-05-09  4:24   ` Krishna Kumar2

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox