From owner-freebsd-acpi@FreeBSD.ORG Wed Oct 3 13:08:33 2012 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5F3E106566B; Wed, 3 Oct 2012 13:08:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C31148FC0A; Wed, 3 Oct 2012 13:08:32 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA06176; Wed, 03 Oct 2012 16:08:30 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <506C38CE.4090400@FreeBSD.org> Date: Wed, 03 Oct 2012 16:08:30 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: sbruno@FreeBSD.org References: <504EDBEB.6010104@FreeBSD.org> <1349198313.4246.3.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1349198313.4246.3.camel@powernoodle.corp.yahoo.com> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: "freebsd-acpi@freebsd.org" , Sean Bruno Subject: Re: notify userland about C-state changes X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 13:08:33 -0000 on 02/10/2012 20:18 Sean Bruno said the following: > >> The following patch adds only per-CPU notifications. >> >> acpi_cpu: explicitly notify userland about c-state changes >> >> diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c >> index 82e204a..15201f9 100644 >> --- a/sys/dev/acpica/acpi_cpu.c >> +++ b/sys/dev/acpica/acpi_cpu.c >> @@ -1054,6 +1054,8 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context) >> ACPI_SERIAL_BEGIN(cpu); >> acpi_cpu_set_cx_lowest(sc); >> ACPI_SERIAL_END(cpu); >> + >> + acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify); >> } >> >> static int >> > > So quick question, does this happen a lot on a system with a sporadic > workload? Does this introduce overhead to the system to service the > notification requests? I am not sure who can answer this question. It is up to ACPI platform to decide when it changes _available C-states_. OS doesn't have control over that. P.S. I hope you haven't confused this notification for a notification about _current_ C-state changing. -- Andriy Gapon