summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2007-07-30 15:21:26 +0000
committernjl <njl@FreeBSD.org>2007-07-30 15:21:26 +0000
commitdc9f653549ec5c7bb7102c3c72f780250d3f72d0 (patch)
tree1705c429fcb713f456cc0afcb694026037de21c2 /sys
parenta969e2957be55a6de5c5d2a0466d00943b4f4c80 (diff)
downloadFreeBSD-src-dc9f653549ec5c7bb7102c3c72f780250d3f72d0.zip
FreeBSD-src-dc9f653549ec5c7bb7102c3c72f780250d3f72d0.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpica/acpi_hpet.c2
-rw-r--r--sys/dev/acpica/acpi_timer.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_hpet.c b/sys/dev/acpica/acpi_hpet.c
index f0efff3..56a9c9c 100644
--- a/sys/dev/acpica/acpi_hpet.c
+++ b/sys/dev/acpica/acpi_hpet.c
@@ -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
diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c
index f83978e..73bd5ed 100644
--- a/sys/dev/acpica/acpi_timer.c
+++ b/sys/dev/acpica/acpi_timer.c
@@ -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);
OpenPOWER on IntegriCloud