Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Oct 2014 14:35:52 +0000 (UTC)
From:      Will Andrews <will@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272360 - head/sys/dev/acpica/Osd
Message-ID:  <201410011435.s91EZq11022179@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410011435.s91EZq11022179>