lkml.org 
[lkml]   [2014]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/5] irq_work: Implement remote queueing
On Mon, May 26, 2014 at 06:02:24PM +0200, Peter Zijlstra wrote:
> On Sun, May 25, 2014 at 04:29:49PM +0200, Frederic Weisbecker wrote:
> > +bool irq_work_queue_on(struct irq_work *work, int cpu)
> > +{
> > + /* Only queue if not already pending */
> > + if (!irq_work_claim(work))
> > + return false;
> > +
> > + /* All work should have been flushed before going offline */
> > + WARN_ON_ONCE(cpu_is_offline(cpu));
> WARN_ON_ONCE(in_nmi());

But it's actually NMI safe, isn't it?

>
>
> Also, I would do both these checks before the claim thing.

Right, I'll move the check.

>
> > +
> > + if (llist_add(&work->llnode, &per_cpu(raised_list, cpu)))
> > + native_send_call_func_single_ipi(cpu);
> > +
> > + return true;
> > +}
> > +EXPORT_SYMBOL_GPL(irq_work_queue_on);
>
>




\
 
 \ /
  Last update: 2014-05-26 19:21    [W:0.052 / U:5.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site