Hi Len,
Thanks, I have tried using the PowerTop application and modified to see it
for dual core but i am not able to get the proper results (c state
information for second core is not proper) also I have found through the
PowerTop developers that the application is not suitable for full load power
measurement. I am not quite sure what does the idle mode means though i
think it means that no user level applications are running. I am not able to
further use the PowerTop as it doesn't provide mechanism for changing the
processor state by user and I guess there are only few utilities for doing
frequency scaling like cpfreq-set utility, I need to develop customized
utility. I would like to know how I can develop my own utility using ACPI if
it is feasible? Also if any specific development environment is required to
do so?
Thanks and Regards,
Nisha
On Thu, Dec 24, 2009 at 2:16 PM, Len Brown <lenb(a)kernel.org> wrote:
On Wed, 23 Dec 2009, nisha jain wrote:
> Hi All,
>
> I am working on research related to Power management and control for
single and multiprocessors and I came across ACPI standard. I want
> to get all CPU power information (c state and frequency p state
information) for different applications and kernel processes running
> into system (with load). I went through user manual of the ACPI and as
per my understaning there is some information written by the
> ACPI HW/SW module and ACPI is already a part of most Linux kernels.I went
through all the acpi site but there is no sample program to
> show its usage also i have installed the UNIX Format Source Code and
Build Environment and UNIX Format Test Suite of the ACPI and
> successfully compiled it. I am not sure how and which acpi APIs needs to
be called to get such information and how to install the ACPI
> library...Also I want to control CPU frquency and state not sure how to
achieve it using ACPI library?
>
> I am using an environment with Intel Dual Core Tm processor and Ubuntu
platform.
Hi Nisha,
ACPI is an interface between the hardware and the OS,
not an interface between the kernel and user-space.
So generally the ACPICA core is hidden inside the kernel
and not directly visible to user-space.
So your question is really about the Linux APIs for
user-space utilities to get to the stuff that is
implemented by ACPI.
On Linux, we endeavor to expose ACPI directly to application layer
only for debugging hooks -- eg the old /proc/acpi/*
and the new /sys/firmware/acpi/*
In general, we try to have generic policy code that doesn't
directly know if ACPI is involved in the underlying implementation.
For example, cpufreq abstracts ACPI P-states, cpuidle
abstracts ACPI C-states, thermal abstracts ACPI thermal & T-states,
power supply abstracts ACPI battery etc.
Note that the powertop application is available in most recent distros
to grab and summarize a lot of what you may be seeking.
It looks in /sys/devices/system/cpu/* for cpufreq and cpuidle info.
cheers,
-Len Brown
Intel Open Source Technology Center