Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Oct 2012 16:08:30 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        sbruno@FreeBSD.org
Cc:        "freebsd-acpi@freebsd.org" <freebsd-acpi@FreeBSD.org>, Sean Bruno <seanbru@yahoo-inc.com>
Subject:   Re: notify userland about C-state changes
Message-ID:  <506C38CE.4090400@FreeBSD.org>
In-Reply-To: <1349198313.4246.3.camel@powernoodle.corp.yahoo.com>
References:  <504EDBEB.6010104@FreeBSD.org> <1349198313.4246.3.camel@powernoodle.corp.yahoo.com>

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



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