lkml.org 
[lkml]   [2005]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH] Runtime switching of the idle function [take 2]
From
Date
Ingo Molnar <mingo@elte.hu> writes:

> * Andrew Morton <akpm@osdl.org> wrote:
>
> > > 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.
> >
> > Use gettimeofday()?
> >
> > If it's just for some sort of instrumentation, run NR_CPUS instances
> > of a niced-down busyloop, pin each one to a different CPU? That way
> > the idle function doesn't get called at all..
>
> idle=poll is also frequently done for performance reasons [it reduces
> idle wakeup latency by 10 usecs]

And it's obsolete on CPUs with monitor/mwait.
And in practice the CPU will run so hot that only benchmarkers like it.

I think switching idle is the wrong way to do. We should rather
fix the various problems.

For fixing the TSC issue it is 100% the wrong approach Imho.
Basically software has to live with TSCs being unsynchronized
and gettimeofday should do the right thing (and if not it should be fixed)

- while it could be turned off if the
> system has been idle for some time. E.g. cpufreqd could sample idle time
> and turn on/off idle=poll. High-performance setups could enable it all
> the time.

And upgrade their server air condition or issue additional ear protection
to the desktop user? Most likely you will just drive the CPUs into
thermal throttle at some point with that, not get more performance anyways.

> as long as it can be done with zero-cost, i dont see why Steven's patch
> wouldnt be a plus for us. It's a performance thing, and having runtime
> switches for seemless performance features cannot be bad.

The interface is ugly and I suspect fixing the various obscure race this
obscure feature would undoubtedly add will be a long term maintenance
issue. And it's the wrong thing to do anyways because it just papers
over other problems that should be fixed in the right way.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-29 14:40    [W:0.115 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site