lkml.org 
[lkml]   [2011]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC tip/core/rcu 11/11] rcu: move TREE_RCU from softirq to kthread
On Tue, Mar 01, 2011 at 03:38:11PM +0100, Peter Zijlstra wrote:
> On Mon, 2011-02-28 at 16:13 -0800, Paul E. McKenney wrote:
>
> > I am OK doing the sched_setscheduler_nocheck() in UP_PREPARE, correct?
>
> Yeah, it should be perfectly fine to call that.

Cool!

> > Ah, there is the rub -- I am using wait_event(), so I need to wake up the
> > kthread once before anyone uses it (or at least concurrently with anyone
> > using it). Which I can presumably do from the CPU_STARTING notifier.
>
> Right, so your kthread is doing:
>
> static int rcu_cpu_kthread()
> {
> for (;;) {
> wait_event_interruptible();
>
> /* do stuff */
>
> }
> return 0;
> }
>
> Which means that all folks wanting to make use of this already need to
> do a wakeup. So I don't see any reason to do that first wakeup from
> CPU_STARTING.

That is good to hear, because doing so seems to result in abject failure.

> wait_event() will only actually wait if the condition is false, in the
> start-up case above it will find the condition true and fall right
> through to do stuff.

So as long as it is OK to call sched_setscheduler_nocheck() before
the kthread is first awakened, we should be OK.

Thanx, Paul


\
 
 \ /
  Last update: 2011-03-02 01:09    [W:0.100 / U:1.224 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site