: softirq: Add support for triggering softirq work on softirqs.
Subsystems (2)
David Miller
maintainerPATCH 1/2 : softirq: Add support for triggering softirq work on softirqs.
softirq: Add support for triggering softirq work on softirqs.
This is basically a genericization of Jens Axboe's block layer remote softirq changes.
--- include/linux/interrupt.h | 6 ++- kernel/softirq.c | 103 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletions(-)
include/linux/interrupt.h +5 -1
@@ -11,6 +11,8 @@#include <linux/hardirq.h> #include <linux/sched.h> #include <linux/irqflags.h> +#include <linux/smp.h> +#include <linux/percpu.h> #include <asm/atomic.h> #include <asm/ptrace.h> #include <asm/system.h>
@@ -270,7 +272,9 @@ extern void softirq_init(void);#define __raise_softirq_irqoff (nr) do { or_softirq_pending(1UL << (nr)); } while (0)extern void raise_softirq_irqoff (unsigned int nr);extern void raise_softirq (unsigned int nr); - +DECLARE_PER_CPU(struct list_head, softirq_work_list[32]); +extern void __send_remote_softirq (struct call_single_data *cp,int cpu,int this_cpu,int softirq); +extern void send_remote_softirq (struct call_single_data *cp,int cpu,int softirq);/* Tasklets --- multithreaded analogue of BHs.
kernel/softirq.c +103 -0
126 lines not on this page · raw message
Signature · 1 line
1.5.6.5
Quoted 5 lines · David Miller
softirq: Add support for triggering softirq work on softirqs.
This is basically a genericization of Jens Axboe's block layer remote softirq changes.
Looks good Dave! One small comment - instead of using 32, how about just adding a NR_SOFTIRQ at the bottom of the softirq enum and use that for the softirq_work_list sizing?
Apart from that, you can add my Signed-off-by.
Signature · 1 line
Jens Axboe
David Miller
maintainerFrom: Jens Axboe <[email protected]>
Date: Thu, 18 Sep 2008 06:35:42 +0200
Quoted 10 lines · David Miller
Quoted 5 lines
softirq: Add support for triggering softirq work on softirqs.
This is basically a genericization of Jens Axboe's block layer remote softirq changes.
Looks good Dave! One small comment - instead of using 32, how about just adding a
NR_SOFTIRQat the bottom of the softirq enum and use that for thesoftirq_work_listsizing?
Good idea.
Quoted 1 line
Apart from that, you can add my Signed-off-by.
Great, thanks for looking at this.
Quoted 7 lines · David Miller
From: Jens Axboe <[email protected]>
Date: Thu, 18 Sep 2008 06:35:42 +0200Quoted 4 lines · David Miller
Quoted 3 lines
softirq: Add support for triggering softirq work on softirqs.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
This is basically a genericization of Jens Axboe's block layer remote softirq changes.
Looks good Dave! One small comment - instead of using 32, how about just adding a
NR_SOFTIRQat the bottom of the softirq enum and use that for thesoftirq_work_listsizing?Good idea.
I suppose you could add lkml too as Andrew might not be happy if this kind of thing gets done behind his back on netdev/net-next only (considering some past experience)? :-)
Signature · 1 line
i.
David Miller
maintainerFrom: "Ilpo Järvinen" <[email protected]>
Date: Thu, 18 Sep 2008 10:40:06 +0300 (EEST)
Quoted 3 lines
I suppose you could add lkml too as Andrew might not be happy if this kind of thing gets done behind his back on netdev/net-next only (considering some past experience)? :-)
Yep, good idea, I'll do that when I next report this stuff.
I wonder if the added overhead of local_irq_disable/local_irq_enable is killing any performance gain. Certainly it adds more latency to a sensitive code path.
Is there a good lock-less solution?
David Miller
maintainerFrom: Stephen Hemminger <[email protected]>
Date: Fri, 19 Sep 2008 09:57:30 -0700 (PDT)
Quoted 4 lines
I wonder if the added overhead of local_irq_disable/local_irq_enable is killing any performance gain. Certainly it adds more latency to a sensitive code path.
Is there a good lock-less solution?
The cross-cpu IPI is 1,000 times more expensive than the local IRQ enable/disable (on x86 it's a bunch of APIC programming), so if you're looking for cost analysis start there.