Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU implementation

From: Andi Kleen
Date: Mon Sep 01 2008 - 05:38:40 EST


"Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> writes:
>
> -#if defined(CONFIG_PREEMPT_RCU) && defined(CONFIG_NO_HZ)
> +#if defined(CONFIG_NO_HZ)
> extern void rcu_irq_enter(void);
> extern void rcu_irq_exit(void);
> #else
> # define rcu_irq_enter() do { } while (0)
> # define rcu_irq_exit() do { } while (0)
> -#endif /* CONFIG_PREEMPT_RCU */
> +#endif /* #if defined(CONFIG_NO_HZ) */

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
it out of many fast paths.

Haven't read everything, sorry.

-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/