On Thu, 7 Aug 2014 20:46:35 +0200 Peter Zijlstra <pet...@infradead.org> wrote:
> On Thu, Aug 07, 2014 at 07:27:53PM +0200, Peter Zijlstra wrote: > > Right, Steve (and Paul) please explain _why_ this is an 'RCU' at all? > > _Why_ do we have call_rcu_task(), and why is it entwined in the 'normal' > > RCU stuff? We've got SRCU -- which btw started out simple, without > > call_srcu() -- and that lives entirely independent. And SRCU is far more > > an actual RCU than this thing is, its got read side primitives and > > everything. > > > > Also, I cannot think of any other use besides trampolines for this > > thing, but that might be my limited imagination. > > Also, trampolines can end up in the return frames, right? So how can you > be sure when to wipe them? Passing through schedule() isn't enough for > that. Not sure what you mean. > > Userspace is, but kernel threads typically don't ever end up there. Only voluntary calls to schedule() will be a quiescent state. Preempt doesn't count. And no, function callbacks to not call schedule(), function callbacks should be treated even stricter than interrupt handlers. They should never call schedule() directly or even take any locks. Heck, they should be stricter than NMIs for that matter. Hence, once something calls schedule() directly, we know that it is not on a trampoline, nor is it going to return to one. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/