svn commit: r272360 - head/sys/dev/acpica/Osd
Will Andrews
will at FreeBSD.org
Wed Oct 1 14:35:53 UTC 2014
Author: will
Date: Wed Oct 1 14:35:52 2014
New Revision: 272360
URL: https://svnweb.freebsd.org/changeset/base/272360
Log:
Add sysctl to track the resource consumption of ACPI interrupts.
Submitted by: gibbs
MFC after: 1 month
Sponsored by: Spectra Logic
MFSpectraBSD: 636827 on 2012/09/28
Modified:
head/sys/dev/acpica/Osd/OsdSchedule.c
Modified: head/sys/dev/acpica/Osd/OsdSchedule.c
==============================================================================
--- head/sys/dev/acpica/Osd/OsdSchedule.c Wed Oct 1 14:12:02 2014 (r272359)
+++ head/sys/dev/acpica/Osd/OsdSchedule.c Wed Oct 1 14:35:52 2014 (r272360)
@@ -60,6 +60,13 @@ SYSCTL_INT(_debug_acpi, OID_AUTO, max_ta
0, "Maximum acpi tasks");
/*
+ * Track and report the system's demand for task slots.
+ */
+static int acpi_tasks_hiwater;
+SYSCTL_INT(_debug_acpi, OID_AUTO, tasks_hiwater, CTLFLAG_RD,
+ &acpi_tasks_hiwater, 1, "Peak demand for ACPI event task slots.");
+
+/*
* Allow the user to tune the number of task threads we start. It seems
* some systems have problems with increased parallelism.
*/
@@ -151,6 +158,10 @@ acpi_task_enqueue(int priority, ACPI_OSD
acpi_task_count++;
break;
}
+
+ if (i > acpi_tasks_hiwater)
+ atomic_cmpset_int(&acpi_tasks_hiwater, acpi_tasks_hiwater, i);
+
if (at == NULL) {
printf("AcpiOsExecute: failed to enqueue task, consider increasing "
"the debug.acpi.max_tasks tunable\n");
More information about the svn-src-all
mailing list