Re: [PATCH] Remove RCU abuse in cpu_idle()

From: Nish Aravamudan
Date: Sun Dec 19 2004 - 21:28:47 EST


On Mon, 20 Dec 2004 12:56:24 +1100, Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote:
> On Sun, 2004-12-19 at 18:44 -0700, Zwane Mwaikambo wrote:
> > On Mon, 20 Dec 2004, Nick Piggin wrote:
> >
> > > This thread can possibly be stalled forever if there is a CPU hog
> > > running, right?
> >
> > Yep.
> >
> > > In which case, you will want to use ssleep rather than a busy loop.
> >
> > Well ssleep essentially does the same thing as the schedule_timeout.
> >
>
> Yes - so long as you set ->state when using schedule_timeout ;)

You do not need to set the state before calling ssleep(). It is set to
TASK_UNINTERRUPTIBLE within the loop of ssleep().

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