From owner-svn-src-head@FreeBSD.ORG Wed Oct 1 14:35:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2E6DE0D; Wed, 1 Oct 2014 14:35:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF984F1E; Wed, 1 Oct 2014 14:35:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91EZqGV022180; Wed, 1 Oct 2014 14:35:52 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91EZq11022179; Wed, 1 Oct 2014 14:35:52 GMT (envelope-from will@FreeBSD.org) Message-Id: <201410011435.s91EZq11022179@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 1 Oct 2014 14:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272360 - head/sys/dev/acpica/Osd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 14:35:53 -0000 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");