* [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
* Re: [PATCH] core: Call net_tx_action only if work pending
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
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2007-05-09 1:59 UTC (permalink / raw)
To: krkumar2; +Cc: netdev
From: Krishna Kumar <krkumar2@in.ibm.com>
Date: Tue, 08 May 2007 13:01:30 +0530
> 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>
I don't think downing a cpu is done so often as to justify this
microscopic optimization, do you?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] core: Call net_tx_action only if work pending
2007-05-09 1:59 ` David Miller
@ 2007-05-09 4:24 ` Krishna Kumar2
0 siblings, 0 replies; 3+ messages in thread
From: Krishna Kumar2 @ 2007-05-09 4:24 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Agreed :)
- KK
David Miller <davem@davemloft.net> wrote on 05/09/2007 07:29:52 AM:
> From: Krishna Kumar <krkumar2@in.ibm.com>
> Date: Tue, 08 May 2007 13:01:30 +0530
>
> > 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>
>
> I don't think downing a cpu is done so often as to justify this
> microscopic optimization, do you?
^ 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