Messages in this thread | | | Date | Mon, 12 May 2014 09:56:50 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH 1/5] irq_work: Architecture support for remote irq work raise |
| |
On Mon, May 12, 2014 at 01:33:53AM +0200, Frederic Weisbecker wrote: > We are going to extend irq work to support remote queuing. > > So lets add a cpu argument to arch_irq_work_raise(). The architectures > willing to support that must then provide the backend to raise irq work > IPIs remotely. > > Initial support is provided for x86 and ARM since they are easily > extended. The other archs that overwrite arch_irq_work_raise() seem > to use local clock interrupts and therefore need deeper rewrite of their > irq work support to implement remote raising. >
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Why not borrow the smp_call_function IPI for the remote bits? We could limit the 'safe from NMI' to the local works. And we validate this by putting a WARN_ON(in_nmi()) in irq_work_queue_on().
At some later stage we could look at maybe merging the smp_function_call and irq_work into a single thing, where we have the irq_work interface as async and the smp_function_call() as sync interface.
But for now a quick 'hack' would be to call __irq_work_run() from generic_smp_call_function_single_interrupt().
That would leave arch_irq_work_raise() as the special NMI safe local IPI hook. [unhandled content-type:application/pgp-signature] | |