Re: [PATCH] Option to disable AMD C1E (allows dynticks to work)

Eduard-Gabriel Munteanu
2007-12-14T09:43:22Z

On Thu, 13 Dec 2007 23:33:07 +0100
Andi Kleen <andi@firstfloor.org> wrote:

> The description/option is not correct. The mainline kernel never
> disables C1e. Some distribution kernels and Xen do, perhaps you're
> confusing this with them.
>
> You would rather need a "force_disable_c1e" option if anything.

The option I added (which is set to Y by default, but that's another
matter) disables C1E without any other kernel parameter. In my opinion,
this should be the normal behavior: the kernel has both SMP and NO_HZ
enabled, so do whatever is necessary to enable dynticks. But it would
also be useful, for benchmarking purposes, to prevent the kernel from
disabling C1E using a kernel parameter; that's what force_amd_c1e does.

> Anyways this should be near all obsolete with forced HPET. With HPET
> dynticks can be used even with C1e. So in most cases you can just
> use hpet=force instead and get dynticks and C1e together.

On my system, hpet=force does not enable dynticks:
$ dmesg | grep -E "(not functional|hpet)"
Command line: ro hpet=force
Kernel command line: ro hpet=force
hpet clockevent registered
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 31
hpet0: 3 32-bit timers, 25000000 Hz
Time: hpet clocksource has been installed.
Clockevents: could not switch to one-shot mode: lapic is not functional.
Clockevents: could not switch to one-shot mode: lapic is not functional.
hpet_resources: 0xfed00000 is busy

But, using this patch, the kernel enables dynticks.