Re: [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 3

From: Con Kolivas
Date: Fri Aug 05 2005 - 00:17:14 EST


On Fri, 5 Aug 2005 01:03 am, Vojtech Pavlik wrote:
> On Wed, Aug 03, 2005 at 04:23:59PM +0200, Jan De Luyck wrote:
> > On Wednesday 03 August 2005 14:14, Con Kolivas wrote:
> > > On Wed, 3 Aug 2005 21:54, Jan De Luyck wrote:
> > > > On Wednesday 03 August 2005 07:59, Con Kolivas wrote:
> > > > > This is the dynamic ticks patch for i386 as written by Tony Lindgen
> > > > > <tony@xxxxxxxxxxx> and Tuukka Tikkanen
> > > > > <tuukka.tikkanen@xxxxxxxxxxxxxx>. Patch for 2.6.13-rc5
> > > >
> > > > Compiles and runs ok here.
> > > >
> > > > Is there actually any timer frequency that's advisable to set as
> > > > maximum? (in the kernel config)
> > >
> > > I'd recommend 1000.
> >
> > Thanks. Currently the system - under X, KDE, no artsd, bottoms at around
> > 300HZ. In total single mode with every module unloaded that I can unload
> > it stops around 22HZ.
> >
> > I guess I'll have to go hunting whatever thing is causing the pollings.
> > no timertop yet, I guess? :P
>
> i8042 runs a steady periodic 20Hz timer. You can make it slower to get
> even the total low lower, and it will not affect performance under
> normal (sane hardware) circumstances.

Indeed and this patch (safely tried at home but serves no useful purpose
really) confirms a reasonable drop without problems. After this, only fbcon
polls at a similar rate (HZ/5).

Of interest to those using an ondemand scaling governor, now that we have
timertop, I have found that the default ondemand settings lead to
delayed_work_timer_fn at about 140Hz and this can be dropped substantially by
slowing the rate of polling (and subsequently slowing the speed with which
the ondemand governor responds) down to <25 by

echo 100000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate

(the default is 10000 and the value is confusing as the rate goes down as you
increase this value).

Cheers,
Con
Index: linux-2.6.13-rc5-ck2/drivers/input/serio/i8042.h
===================================================================
--- linux-2.6.13-rc5-ck2.orig/drivers/input/serio/i8042.h 2005-07-06 16:56:52.000000000 +1000
+++ linux-2.6.13-rc5-ck2/drivers/input/serio/i8042.h 2005-08-05 15:03:49.000000000 +1000
@@ -44,7 +44,7 @@
* polling.
*/

-#define I8042_POLL_PERIOD HZ/20
+#define I8042_POLL_PERIOD HZ/5

/*
* Status register bits.