Re: [PATCH] rcu: Is it safe to enter an RCU read-side criticalsection?

From: Frederic Weisbecker
Date: Mon Sep 09 2013 - 09:49:28 EST


On Mon, Sep 09, 2013 at 09:41:32AM -0400, Steven Rostedt wrote:
> On Mon, 9 Sep 2013 15:29:02 +0200
> Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:
>
>
> > No, putting that on the task_struct won't help much in this regard I think.
> > Regular schedule() calls don't change that per cpu state.
>
> But is there a place that it would need to?

I don't have any in mind.

>
> I mean, if RCU is not tracking a CPU, is it safe to call schedule().

Nope, a CPU is not allowed to call schedule() if RCU is not tracking it.

> And then how would the new task know that RCU is ignoring that CPU?

On return from schedule(), it's (supposed to be) guaranteed that the CPU
is always tracked by RCU.

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