lkml.org 
[lkml]   [2012]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 8/9] irq_work: Make self-IPIs optable
From
Date
On Fri, 2012-11-16 at 03:21 +0100, Frederic Weisbecker wrote:
>
> /*
> * Claim the entry so that no one else will poke at it.
> @@ -68,14 +59,18 @@ void __weak arch_irq_work_raise(void)
> */
> static void __irq_work_queue(struct irq_work *work)
> {
> - bool empty;
> -
> preempt_disable();
>
> - empty = llist_add(&work->llnode, &__get_cpu_var(irq_work_list));
> - /* The list was empty, raise self-interrupt to start processing. */
> - if (empty)
> - arch_irq_work_raise();
> + llist_add(&work->llnode, &__get_cpu_var(irq_work_list));
> +
> + /*
> + * If the work is flagged as "lazy", just wait for the next tick
> + * to run it. Otherwise, or if the tick is stopped, raise the irq work.

Speaking more Greek? ;-)

How about:

If the work is not "lazy" or the tick is stopped, raise the irq
work interrupt (if supported by the arch), otherwise, just wait
for the next tick.

Other than that, Acked-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve

> + */
> + if (!(work->flags & IRQ_WORK_LAZY) || tick_nohz_tick_stopped()) {
> + if (!this_cpu_cmpxchg(irq_work_raised, 0, 1))
> + arch_irq_work_raise();
> + }
>




\
 
 \ /
  Last update: 2012-11-16 18:01    [W:0.279 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site