Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU implementation
From: Andi Kleen
Date: Tue Sep 02 2008 - 02:15:21 EST
> > It would be better if you hung rcu_irq_enter in the irq_enter() if
> > statement that checks if the task was idle or not. This way it would
> > be zero overhead for interruptions of non busy CPUs, keeping
Sorry that should have been "non idle CPUs" of course.
> > it out of many fast paths.
> >
> > Haven't read everything, sorry.
>
> So that I lose the #else above, and so that irq_enter() and irq_exit()
> look something like the following (with additional adjustments to suit)?
Yes looks good.
BTW I wonder if the compiler CSEs the idle_cpu() check properly.
> void irq_enter(void)
> {
> #ifdef CONFIG_NO_HZ
> int cpu = smp_processor_id();
> if (idle_cpu(cpu) && !in_interrupt())
> tick_nohz_stop_idle(cpu);
> #endif
> __irq_enter();
> #ifdef CONFIG_NO_HZ
> if (idle_cpu(cpu)) {
> rcu_irq_enter();
> tick_nohz_update_jiffies();
> }
> #endif
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/