Dynamically choose the quality of the ACPI timer depending on whether

the fast or safe/slow method is in use.  Fast remains at 1000, slow is
now at 850 (always preferred to TSC).  Since the HPET has proven slower
than ACPI-fast on some systems, drop its quality to 900.  In the future,
it is hoped that HPET performance will improve as it is the main
timer Intel supports.  HPET may move back to 2000 in -current once RELENG_7
is branched to ensure that it gets tested.

Approved by:	re
This commit is contained in:
njl 2007-07-30 15:21:26 +00:00
parent a969e2957b
commit dc9f653549
2 changed files with 4 additions and 2 deletions

View File

@ -70,7 +70,7 @@ struct timecounter hpet_timecounter = {
.tc_get_timecount = hpet_get_timecount,
.tc_counter_mask = ~0u,
.tc_name = "HPET",
.tc_quality = 2000,
.tc_quality = 900,
};
static u_int

View File

@ -96,7 +96,7 @@ static struct timecounter acpi_timer_timecounter = {
0, /* no default counter_mask */
0, /* no default frequency */
"ACPI", /* name */
1000 /* quality */
-1 /* quality (chosen later) */
};
static u_int
@ -185,9 +185,11 @@ acpi_timer_probe(device_t dev)
if (j == 10) {
acpi_timer_timecounter.tc_name = "ACPI-fast";
acpi_timer_timecounter.tc_get_timecount = acpi_timer_get_timecount;
acpi_timer_timecounter.tc_quality = 1000;
} else {
acpi_timer_timecounter.tc_name = "ACPI-safe";
acpi_timer_timecounter.tc_get_timecount = acpi_timer_get_timecount_safe;
acpi_timer_timecounter.tc_quality = 850;
}
tc_init(&acpi_timer_timecounter);