# Timecounter quick question regarding ACPI-safe and ACPI-fast



## einthusan (May 16, 2012)

I have 2 machines, both with the same processor.

Machine 1

```
kern.timecounter.choice: TSC-low(1000) [B]ACPI-safe(850)[/B] i8254(0) dummy(-1000000)
kern.timecounter.hardware: TSC-low
kern.timecounter.stepwarnings: 0
kern.timecounter.tc.i8254.mask: 65535
kern.timecounter.tc.i8254.counter: [B]36426[/B]
kern.timecounter.tc.i8254.frequency: 1193182
kern.timecounter.tc.i8254.quality: 0
kern.timecounter.tc.ACPI-[B]safe.mask[/B]: 16777215
kern.timecounter.tc.ACPI-[B]safe.counter[/B]: 11290953
kern.timecounter.tc.ACPI-[B]safe.frequency[/B]: 3579545
kern.timecounter.tc.ACPI-[B]safe.quality[/B]: 850
kern.timecounter.tc.TSC-low.mask: 4294967295
kern.timecounter.tc.TSC-low.counter: [B]1536880578[/B]
kern.timecounter.tc.TSC-low.frequency: [B]10390820[/B]
```

Machine 2

```
kern.timecounter.choice: TSC-low(1000) ACPI-fast(900) i8254(0) dummy(-1000000)
kern.timecounter.hardware: TSC-low
kern.timecounter.stepwarnings: 0
kern.timecounter.tc.i8254.mask: 65535
kern.timecounter.tc.i8254.counter: 4387
kern.timecounter.tc.i8254.frequency: 1193182
kern.timecounter.tc.i8254.quality: 0
kern.timecounter.tc.ACPI-fast.mask: 16777215
kern.timecounter.tc.ACPI-fast.counter: 8433834
kern.timecounter.tc.ACPI-fast.frequency: 3579545
kern.timecounter.tc.ACPI-fast.quality: 900
kern.timecounter.tc.TSC-low.mask: 4294967295
kern.timecounter.tc.TSC-low.counter: 3931457100
kern.timecounter.tc.TSC-low.frequency: 10390848
```

Why is there such discrepancy when both machines are 99% the same?


----------



## mav@ (May 17, 2012)

Some ACPI timer implementations have a bug, that requires special handling. System tries to detect it during boot and respectively provides either fast or safe handlers.


----------



## einthusan (May 18, 2012)

mav@ said:
			
		

> Some ACPI timer implementations have a bug, that requires special handling. System tries to detect it during boot and respectively provides either fast or safe handlers.



Is the timer dependent on the CPU or some other hardware on the motherboard? Is it possible that the system using ACPI-safe has defected hardware? I assume overall system performance is affected by which timer is selected?

Should I be using HPET instead? Is a kernel rebuild required in order for HPET to show up in kern.timecounter.choice? I am using the GENERIC kernel, maybe I should rebuild it specifically for the processor which I am using?


----------



## mav@ (May 18, 2012)

einthusan said:
			
		

> Is the timer dependent on the CPU or some other hardware on the motherboard? Is it possible that the system using ACPI-safe has defected hardware? I assume overall system performance is affected by which timer is selected?



It is more to motherboard then to CPU. ACPI doesn't specify where exactly this timer is implemented, but most likely in chipset. Yes, performance may vary, but not dramatically.



			
				einthusan said:
			
		

> Should I be using HPET instead? Is a kernel rebuild required in order for HPET to show up in kern.timecounter.choice? I am using the GENERIC kernel, maybe I should rebuild it specifically for the processor which I am using?



If HPET would be detected, you would see it there automatically. Check your BIOS settings to be sure it is not just disabled there.


----------



## einthusan (May 18, 2012)

mav@ said:
			
		

> It is more to motherboard then to CPU. ACPI doesn't specify where exactly this timer is implemented, but most likely in chipset. Yes, performance may vary, but not dramatically.
> 
> 
> 
> If HPET would be detected, you would see it there automatically. Check your BIOS settings to be sure it is not just disabled there.



Thanks!


----------

