Skip to contentSkip to conversation

core: Call net_tx_action only if work pending

PATCH In review Krishna Kumar 2 participants 3 messages May 8, 2007 – May 9, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 core: Call net_tx_action only if work pending

Optimize call to net_tx_action only if work is pending.

Patch against net-2.6.22.git

---

net/core/dev.c +2 -1
diff -ruNp org/net/core/dev.c new/net/core/dev.c
@@ -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 */
maintainer
#1 lore raw

From: Krishna Kumar <[email protected]>
Date: Tue, 08 May 2007 13:01:30 +0530

Quoted 5 lines

Optimize call to net_tx_action only if work is pending.

Patch against net-2.6.22.git

I don't think downing a cpu is done so often as to justify this microscopic optimization, do you?

#2 lore raw

Agreed :)

- KK

David Miller <[email protected]> wrote on 05/09/2007 07:29:52 AM:

Quoted 11 lines

From: Krishna Kumar <[email protected]>
Date: Tue, 08 May 2007 13:01:30 +0530

Quoted 5 lines

Optimize call to net_tx_action only if work is pending.

Patch against net-2.6.22.git

I don't think downing a cpu is done so often as to justify this microscopic optimization, do you?