Messages in this thread | | | Date | Tue, 13 Aug 2013 07:33:57 -0400 | From | Steven Rostedt <> | Subject | Re: [PATCH] fix a Sparse warning in the arch/x86/kernel/irq_work.c file |
| |
On Tue, 13 Aug 2013 11:09:34 +0530 anish singh <anish198519851985@gmail.com> wrote:
> > Instead, it calls irq_work() to do the event within a normal interrupt > > context. Some architectures have the ability to trigger an interrupt on > > irq_work processes event in normal interrupt context as you said but > why interrupt context ? Is it because of the fast processing which is > needed? Can we use softirq as anyways we have interrupt > disabled(functions which calls irq_work makes sure of that right?). > Hope I am not asking something very obvious. >
We just need to make sure the work gets done outside of problem areas. Usually, outside of locks, and specifically locks that disable interrupts. Now, if irq_work() is needed outside of a lock that only disables softirq, then you are correct, this would not be enough. But really, because it's called "irq_work()" and not "softirq_work()", you shouldn't be using locks that don't disable interrupts with a irq_work handler.
Making it happen in softirq will just complicate the process. Real interrupts are just easier to implement and suits the job well.
-- Steve
| |