Re: [PATCH tip/core/rcu 01/23] rcu: Move RCU grace-periodinitialization into a kthread

From: Peter Zijlstra
Date: Thu Sep 06 2012 - 09:33:18 EST


On Thu, 2012-08-30 at 11:18 -0700, Paul E. McKenney wrote:
> +static int rcu_gp_kthread(void *arg)
> +{
> + unsigned long flags;
> + struct rcu_data *rdp;
> + struct rcu_node *rnp;
> + struct rcu_state *rsp = arg;
> +
> + for (;;) {
> +
> + /* Handle grace-period start. */
> + rnp = rcu_get_root(rsp);
> + for (;;) {
> + wait_event_interruptible(rsp->gp_wq, rsp->gp_flags);
> + if (rsp->gp_flags)
> + break;
> + flush_signals(current);
> + }
> + raw_spin_lock_irqsave(&rnp->lock, flags);

You're in a kthread, it should be impossible for IRQs to be disabled
here, no? Similar for most (all) other sites in this function.

Using the unconditional IRQ disable/enable is generally faster.
--
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/