lkml.org 
[lkml]   [2006]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 08/23] dynticks: prepare the RCU code
On Fri, 29 Sep 2006 23:58:27 -0000
Thomas Gleixner <tglx@linutronix.de> wrote:
> From: Ingo Molnar <mingo@elte.hu>
>
> prepare the RCU code for dynticks/nohz. Since on nohz kernels there
> is no guaranteed timer IRQ that processes RCU callbacks, the idle
> code has to make sure that all RCU callbacks that can be finished
> off are indeed finished off. This patch adds the necessary APIs:
> rcu_advance_callbacks() [to register quiescent state] and
> rcu_process_callbacks() [to finish finishable RCU callbacks].
>
> ...
>
> +void rcu_advance_callbacks(int cpu, int user)
> +{
> + if (user ||
> + (idle_cpu(cpu) && !in_softirq() &&
> + hardirq_count() <= (1 << HARDIRQ_SHIFT))) {
> + rcu_qsctr_inc(cpu);
> + rcu_bh_qsctr_inc(cpu);
> + } else if (!in_softirq())
> + rcu_bh_qsctr_inc(cpu);
> +}
> +

I hope this function is immediately clear to the RCU maintainers, because it's
complete mud to me.

An introductory comment which describes what this function does and how it
does it seems appropriate. And some words which decrypt the tests in there
might be needed too.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-30 10:43    [W:0.488 / U:0.744 seconds]
©2003-2014 Jasper Spaans. Advertise on this site