Re: [PATCH 08/57] microblaze_v7: Interrupt handling, timer support,selfmod code

From: Thomas Gleixner
Date: Sat Mar 21 2009 - 07:14:43 EST


On Sat, 21 Mar 2009, Michal Simek wrote:
> CONFIG_HZ_100=y
> # CONFIG_HZ_250 is not set
> # CONFIG_HZ_300 is not set
> # CONFIG_HZ_1000 is not set
> CONFIG_HZ=100
>
> For NO_HZ val I shouldn't use HZ value because of NO_HZ and HZ values shouldn't
> be in .config file. Am I right?

No. NO_HZ does not remove the HZ value from the kernel. There is way
too much code depending on it. What NO_HZ does is to supress the
periodic tick when the system goes idle and the next timer expiry is
farther away than 1 HZ. When the system is non idle then the periodic
tick runs again. NO_HZ is merily for power saving.

In a normal kernel when the machine is idle then we wake up every HZ
to find out that there is no work to do and we go idle again. But if
you think about it then this is stupid, because the kernel knows when
the next timer is due to expire. So if the next timer expiry is
e.g. 100ms away, then we can sleep for full 100ms instead of sleeping
10 * 10ms (HZ=100) or 100 * 1ms (HZ=1000). This allows systems to go
into deeper power saving states.

You should be able to observe the difference by monitoring
/proc/interrupts. A nohz enabled kernel should have significantly less
timer interrupts on an idle system.

Thanks,

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