aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2014-10-01 14:35:52 +0000
committerWill Andrews <will@FreeBSD.org>2014-10-01 14:35:52 +0000
commitbb6b32dd818fbf3e1c8f726a9330170a9e31a62b (patch)
treeba5c05a39b839838be30eec6c6fca4042ae41cd0 /sys/dev/acpica
parentfbce0221eb9a0efc115280fff294fd26469416ff (diff)
downloadsrc-bb6b32dd818fbf3e1c8f726a9330170a9e31a62b.tar.gz
src-bb6b32dd818fbf3e1c8f726a9330170a9e31a62b.zip
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
Notes
Notes: svn path=/head/; revision=272360
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/Osd/OsdSchedule.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c
index d49f886c9b8b..e998fee7860c 100644
--- a/sys/dev/acpica/Osd/OsdSchedule.c
+++ b/sys/dev/acpica/Osd/OsdSchedule.c
@@ -60,6 +60,13 @@ SYSCTL_INT(_debug_acpi, OID_AUTO, max_tasks, CTLFLAG_RDTUN, &acpi_max_tasks,
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_EXEC_CALLBACK Function, void *Context)
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");