Re: [RFC][PATCH] Runtime switching of the idle function [take 2]

From: Steven Rostedt
Date: Tue Nov 29 2005 - 09:23:21 EST


On Mon, 2005-11-28 at 20:22 -0800, john stultz wrote:
> On Mon, 2005-11-28 at 22:42 -0500, Steven Rostedt wrote:
> > On Mon, 2005-11-28 at 19:02 -0800, Andrew Morton wrote:
> > > Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> > > >
> > > > This patch creates a directory in /sys/kernel called idle.
> > > >
> > >
> > > At no point do you appear to explain _why_ the kernel needs this feature?
> >
> > Sorry about that. This originally came up when we had problems with the
> > AMD64 x2 in the -rt patch. It was noted that the TSCs would get very
> > far out of sync and cause problems. The way to solve this was to set
> > idle=poll. The original patch I sent was to allow the user to change to
> > idle=poll dynamically. This way they could switch to the poll_idle and
> > run there tests (requiring tsc not to drift) and then switch back to the
> > default idle to save on electricity.
>
> The problem with this is that this must be a one way transition. That
> is, once the TSCs have become unsynchronized, there is no use going back
> to using the polling idle unless you add some code to re-sync the TSCs
> which would be ugly to do after the system has booted.
>

I've thought about that too. But this patch does allow you to start
with idle=poll and then switch back. Also, if you do lock to a cpu,
you don't need to worry about the tsc from slipping if you switch to
idle=poll.

-- Steve

> Using idle=poll (for anything other then debugging) is really a worst
> case workaround for systems that do not have alternative clocksources
> like ACPI PM or HPET.
>
> Its an interesting bit of code, but I'm not really sure I understand its
> usefulness.
>
> thanks
> -john
>
>
>

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