All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Arndale power management
       [not found] <611CFE9D6FBBDC4B97935A5287A11345014441@XSERVER21B.campus.tue.nl>
@ 2013-07-16  6:43 ` Viresh Kumar
  2013-07-16  7:23   ` Lukasz Majewski
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Viresh Kumar @ 2013-07-16  6:43 UTC (permalink / raw)
  To: Comaschi, F.
  Cc: cpufreq, Lists linaro-kernel, Linux PM List, Andy Green,
	Chander Kashyap, Chanwoo Choi, Lukasz Majewski

Adding few more lists so that others can also help..

On 15 July 2013 20:00, Comaschi, F. <fcomaschi@tue.nl> wrote:
> Dear Viresh,
>
> I am Francesco Comaschi, a researcher at Eindhoven University of Technology. My research group is interested in implementing custom power management policies on ARM-based platform (at the moment we are using an Arndale 5250 board featuring Exynos5 dual). We would like  to make use of DVFS and to be able to measure power consumption on the board.

Ok.

> First of all, congratulations for the work that you and the other guys form the power management team are doing within the Linaro community, I always follow your progress, and so far you have been the only reliable source of information for everything I have been doing on the board.

Thanks :)

> If you do not mind, I would like to ask you a few questions:
> 1) Is there a way to measure the board power consumption via software? I have read here: http://blogs.arm.com/software-enablement/925-linux-hwmon-power-management-and-arm-ds-5-streamline/ that it is possible with the ARM Versatile boards, through the hwmon framework and lm_sensors. However, when I run lm_sensors on the Arndale board, no sensors were found. Do you know about any other possible ways to measure power in software? Maybe it is possible to communicate with the on-board PMIC? Maybe there are some registers where information about the power/voltage provided to the processor and the other components is available?

On ARM Versatile express boards and the coretiles that come with it,
we have sensors which are probed through hwmon framework in
Linux. So, we have hardware IPs present on board which let us
get some power figures per cluster for big LITTLE.

I am not sure if Exynos have any such things on it.

@Chander: Are you aware of any such features?

> 2) Recently I have read Andy Green’s presentation “How to measure SoC power”. However, by measuring power on the PMIC input side through the ARM Energy Probe, probably I won't be able to see the effect of DVFS. Do you have any suggestions on how to measure the effect of DVFS, even through hardware measurements?

You need probes on the voltage regulator which is feed the cores...
But again, that is very much hardware specific. And I haven't worked
on Exynos at all :)

> 3) More in general, I do not know which is the best way to implement custom policies of DVFS.

I didn't get you here. Are you talking about tuning of governors here?

> Is it possible, maybe through appropriate API's, to access the cpu_idle and the cpu_freq framework from inside my application? Shall I work directly with the drivers of the PMIC? Is it possible to set the voltage directly from inside my application?

Something on the board must provide this to kernel. Kernel can't
get it by itself.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Arndale power management
  2013-07-16  6:43 ` Arndale power management Viresh Kumar
@ 2013-07-16  7:23   ` Lukasz Majewski
  2013-07-17 11:33     ` Mark Brown
  2013-07-16  8:48   ` Andy Green
  2013-07-25  1:58   ` Mike Turquette
  2 siblings, 1 reply; 6+ messages in thread
From: Lukasz Majewski @ 2013-07-16  7:23 UTC (permalink / raw)
  To: Comaschi, F.
  Cc: Viresh Kumar, cpufreq, Lists linaro-kernel, Linux PM List,
	Andy Green, Chander Kashyap, Chanwoo Choi

Hi Francesco,

> Adding few more lists so that others can also help..
> 
> On 15 July 2013 20:00, Comaschi, F. <fcomaschi@tue.nl> wrote:
> > Dear Viresh,
> >
> > I am Francesco Comaschi, a researcher at Eindhoven University of
> > Technology. My research group is interested in implementing custom
> > power management policies on ARM-based platform (at the moment we
> > are using an Arndale 5250 board featuring Exynos5 dual). We would
> > like  to make use of DVFS and to be able to measure power
> > consumption on the board.
> 
> Ok.
> 
> > First of all, congratulations for the work that you and the other
> > guys form the power management team are doing within the Linaro
> > community, I always follow your progress, and so far you have been
> > the only reliable source of information for everything I have been
> > doing on the board.
> 
> Thanks :)
> 
> > If you do not mind, I would like to ask you a few questions:
> > 1) Is there a way to measure the board power consumption via
> > software? I have read here:
> > http://blogs.arm.com/software-enablement/925-linux-hwmon-power-management-and-arm-ds-5-streamline/
> > that it is possible with the ARM Versatile boards, through the
> > hwmon framework and lm_sensors. However, when I run lm_sensors on
> > the Arndale board, no sensors were found. Do you know about any
> > other possible ways to measure power in software?

I don't know if it will work for you, but for a reference (per-process
not per-task) you can look into the following proposal
http://lwn.net/Articles/557822/

"Per-process power consumption measurement facility"
Konstantin Krivyakin <k.krivyakin@samsung.com>



> > Maybe it is
> > possible to communicate with the on-board PMIC? 

You can look into the PMIC spec if some detailed informations are
exposed. Moreover each battery shall be described by a model, which
PMIC uses e.g. for accurate charging.

PMICs at Exynos4 are communicating via I2C and provide information
about battery state of charge (SoC). You can monitor this value over
time and on this basis get (very coarse) estimation of power
consumption.  

> > Maybe there are
> > some registers where information about the power/voltage provided
> > to the processor and the other components is available?
> 
> On ARM Versatile express boards and the coretiles that come with it,
> we have sensors which are probed through hwmon framework in
> Linux. So, we have hardware IPs present on board which let us
> get some power figures per cluster for big LITTLE.
> 
> I am not sure if Exynos have any such things on it.
> 
> @Chander: Are you aware of any such features?
> 
> > 2) Recently I have read Andy Green’s presentation “How to measure
> > SoC power”. However, by measuring power on the PMIC input side
> > through the ARM Energy Probe, probably I won't be able to see the
> > effect of DVFS. Do you have any suggestions on how to measure the
> > effect of DVFS, even through hardware measurements?
> 
> You need probes on the voltage regulator which is feed the cores...
> But again, that is very much hardware specific. And I haven't worked
> on Exynos at all :)

I can only give you a hint there (since I didn't worked with Arndale ...
yet) - measure current and voltage provided for SoC core Vdd plane.

> 
> > 3) More in general, I do not know which is the best way to
> > implement custom policies of DVFS.
> 
> I didn't get you here. Are you talking about tuning of governors here?
> 
> > Is it possible, maybe through appropriate API's, to access the
> > cpu_idle and the cpu_freq framework from inside my application?

As fair as I see it (probably Viresh will correct me :-) ) the cpu_idle
and cpufreq work in different direction. They provide a response [*] on
the load change caused by the user (by starting heavy load task).

By the response [*] I mean change frequency and voltage level.

> > Shall I work directly with the drivers of the PMIC? Is it possible
> > to set the voltage directly from inside my application?
> 
> Something on the board must provide this to kernel. Kernel can't
> get it by itself.


-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Arndale power management
  2013-07-16  6:43 ` Arndale power management Viresh Kumar
  2013-07-16  7:23   ` Lukasz Majewski
@ 2013-07-16  8:48   ` Andy Green
  2013-07-25  1:58   ` Mike Turquette
  2 siblings, 0 replies; 6+ messages in thread
From: Andy Green @ 2013-07-16  8:48 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Comaschi, F.,
	cpufreq, Lists linaro-kernel, Linux PM List, Chander Kashyap,
	Chanwoo Choi, Lukasz Majewski

Hi -

On 16 July 2013 07:43, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Adding few more lists so that others can also help..
>
> On 15 July 2013 20:00, Comaschi, F. <fcomaschi@tue.nl> wrote:

>> 2) Recently I have read Andy Green’s presentation “How to measure SoC power”. However, by measuring power on the PMIC input side through the ARM Energy Probe, probably I won't be able to see the effect of DVFS. Do you have any suggestions on how to measure the effect of DVFS, even through hardware measurements?
>
> You need probes on the voltage regulator which is feed the cores...
> But again, that is very much hardware specific. And I haven't worked
> on Exynos at all :)

Arndale has a lot of shunts on the board already, I counted 14 last
time I looked.

You will be able to see the power benefit of DVFS extremely clearly at
the input side of the regulator, but you won't see the voltage you
have set reported.

Since the AEP creates trouble on low voltage / high current rails with
its fullscale 165mV drop (you may only have 900mV on Vcore) measuring
current needs to be done on regulator input side.  Since you're
interested in power, you need to measure voltage also at the regulator
input to allow it to be calculated.

However nothing stops you sticking a second AEP channel on the output
side of the regulator just for monitoring its voltage.  You just need
to stick both wires of the pair on the output side for it to report
the voltage separately.  Because you're not using a shunt there, you
don't introduce any voltage drop.

Then you'll see power (+ regulator efficiency loss) one one channel
and actual DVFS voltage (and 0 for current) on the other.

-Andy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Arndale power management
  2013-07-16  7:23   ` Lukasz Majewski
@ 2013-07-17 11:33     ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-07-17 11:33 UTC (permalink / raw)
  To: Lukasz Majewski
  Cc: Comaschi, F.,
	Lists linaro-kernel, Viresh Kumar, cpufreq, Chander Kashyap,
	Linux PM List

[-- Attachment #1: Type: text/plain, Size: 1589 bytes --]

On Tue, Jul 16, 2013 at 09:23:45AM +0200, Lukasz Majewski wrote:

> > > Maybe it is
> > > possible to communicate with the on-board PMIC? 

> You can look into the PMIC spec if some detailed informations are
> exposed. Moreover each battery shall be described by a model, which
> PMIC uses e.g. for accurate charging.

> PMICs at Exynos4 are communicating via I2C and provide information
> about battery state of charge (SoC). You can monitor this value over
> time and on this basis get (very coarse) estimation of power
> consumption.  

There are enormous difficulties in getting useful information from
batteries and chargers - due to things like the battery chemistry
changing over time and thermal dependencies what you get back is so
coarse grained it's of very little use for power metering.  There's also
the fact that on the Arndale the charger isn't wired up accessibly.

Power monitoring is generally done with test equipment rather than on
board features - Versatile Express is very unusual here.  The usual
strategy at system level is to put an ammeter or power meter in line
with the main power supply; otherwise you need the board to have test
access to allow you to hook into individual supplies (typically done
with jumpers in line with the supplies).

> I can only give you a hint there (since I didn't worked with Arndale ...
> yet) - measure current and voltage provided for SoC core Vdd plane.

I've not checked the schematics but there's nothing visible on the board
that I'd associate with current monitoring except the wall supply.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Arndale power management
  2013-07-16  6:43 ` Arndale power management Viresh Kumar
  2013-07-16  7:23   ` Lukasz Majewski
  2013-07-16  8:48   ` Andy Green
@ 2013-07-25  1:58   ` Mike Turquette
       [not found]     ` <611CFE9D6FBBDC4B97935A5287A1134501BB6D@XSERVER21B.campus.tue.nl>
  2 siblings, 1 reply; 6+ messages in thread
From: Mike Turquette @ 2013-07-25  1:58 UTC (permalink / raw)
  To: Viresh Kumar, Comaschi, F.
  Cc: Lukasz Majewski, Lists linaro-kernel, cpufreq, Chander Kashyap,
	Linux PM List

Quoting Viresh Kumar (2013-07-15 23:43:03)
> Adding few more lists so that others can also help..
> 
> On 15 July 2013 20:00, Comaschi, F. <fcomaschi@tue.nl> wrote:
> > Dear Viresh,
> >
> > I am Francesco Comaschi, a researcher at Eindhoven University of Technology. My research group is interested in implementing custom power management policies on ARM-based platform (at the moment we are using an Arndale 5250 board featuring Exynos5 dual). We would like  to make use of DVFS and to be able to measure power consumption on the board.
> 
> Ok.
> 
> > First of all, congratulations for the work that you and the other guys form the power management team are doing within the Linaro community, I always follow your progress, and so far you have been the only reliable source of information for everything I have been doing on the board.
> 
> Thanks :)
> 
> > If you do not mind, I would like to ask you a few questions:
> > 1) Is there a way to measure the board power consumption via software? I have read here: http://blogs.arm.com/software-enablement/925-linux-hwmon-power-management-and-arm-ds-5-streamline/ that it is possible with the ARM Versatile boards, through the hwmon framework and lm_sensors. However, when I run lm_sensors on the Arndale board, no sensors were found. Do you know about any other possible ways to measure power in software? Maybe it is possible to communicate with the on-board PMIC? Maybe there are some registers where information about the power/voltage provided to the processor and the other components is available?
> 
> On ARM Versatile express boards and the coretiles that come with it,
> we have sensors which are probed through hwmon framework in
> Linux. So, we have hardware IPs present on board which let us
> get some power figures per cluster for big LITTLE.
> 
> I am not sure if Exynos have any such things on it.
> 
> @Chander: Are you aware of any such features?
> 
> > 2) Recently I have read Andy Green’s presentation “How to measure SoC power”. However, by measuring power on the PMIC input side through the ARM Energy Probe, probably I won't be able to see the effect of DVFS. Do you have any suggestions on how to measure the effect of DVFS, even through hardware measurements?
> 
> You need probes on the voltage regulator which is feed the cores...
> But again, that is very much hardware specific. And I haven't worked
> on Exynos at all :)
> 
> > 3) More in general, I do not know which is the best way to implement custom policies of DVFS.
> 
> I didn't get you here. Are you talking about tuning of governors here?
> 
> > Is it possible, maybe through appropriate API's, to access the cpu_idle and the cpu_freq framework from inside my application? Shall I work directly with the drivers of the PMIC? Is it possible to set the voltage directly from inside my application?

Are you trying to create a DVFS policy from a userspace application?
Lots of people hack together something using the CPUfreq "userspace"
governor and writing to:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

This is not something that should be shipped on a product but is useful
for learning and prototyping. It only affects the CPU and will not help
you craft DVFS policies on other peripherals/devices.

Regards,
Mike

> 
> Something on the board must provide this to kernel. Kernel can't
> get it by itself.
> 
> _______________________________________________
> linaro-kernel mailing list
> linaro-kernel@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Arndale power management
       [not found]       ` <CAPtuhTg3YdTGy58UT9gVmp9EZNBwxaqv69A8nv_Gackyc5qc5Q@mail.gmail.com>
@ 2013-07-26  6:06         ` Comaschi, F.
  0 siblings, 0 replies; 6+ messages in thread
From: Comaschi, F. @ 2013-07-26  6:06 UTC (permalink / raw)
  To: Mike Turquette
  Cc: l.majewski, viresh.kumar, chander.kashyap, linux-pm,
	linaro-kernel, cpufreq

Yes of course!

Sorry for that ;)

Best,

Francesco
________________________________________
From: Mike Turquette [mturquette@linaro.org]
Sent: Thursday, July 25, 2013 7:36 PM
To: Comaschi, F.
Subject: Re: Arndale power management

Francesco,

Can you reply to the list with your response? Please do not remove the
list when responding.

Regards,
Mike

On Wed, Jul 24, 2013 at 11:11 PM, Comaschi, F. <fcomaschi@tue.nl> wrote:
> Dear Mike,
>
> thank you very much for your reply!
>
> the hack that you suggest is indeed what I have done so far just for testing. However, I was thinking, if we have some knowledge about the specific application that we are running, from a functional point of view (e.g., we are scanning a scene through a camera and we see that there's no movement, therefore we decide to lower the frequency), wouldn't it be useful to exploit this knowledge in order to implement our own DVFS policy in a more proactive way, rather than recurring to the available governors which I think are working in a more reactive way?
> In that case, how would you suggest to interface with the OS from inside my application? Shall I make some "calls" to specific API's, or maybe writing my own governor?
>
> Thanks in advance for your attention!
>
> Best,
>
> Francesco
> ________________________________________
> From: Mike Turquette [mturquette@linaro.org]
> Sent: Thursday, July 25, 2013 3:58 AM
> To: Viresh Kumar; Comaschi, F.
> Cc: Lukasz Majewski; Lists linaro-kernel; cpufreq@vger.kernel.org; Chander Kashyap; Linux PM List
> Subject: Re: Arndale power management
>
> Quoting Viresh Kumar (2013-07-15 23:43:03)
>> Adding few more lists so that others can also help..
>>
>> On 15 July 2013 20:00, Comaschi, F. <fcomaschi@tue.nl> wrote:
>> > Dear Viresh,
>> >
>> > I am Francesco Comaschi, a researcher at Eindhoven University of Technology. My research group is interested in implementing custom power management policies on ARM-based platform (at the moment we are using an Arndale 5250 board featuring Exynos5 dual). We would like  to make use of DVFS and to be able to measure power consumption on the board.
>>
>> Ok.
>>
>> > First of all, congratulations for the work that you and the other guys form the power management team are doing within the Linaro community, I always follow your progress, and so far you have been the only reliable source of information for everything I have been doing on the board.
>>
>> Thanks :)
>>
>> > If you do not mind, I would like to ask you a few questions:
>> > 1) Is there a way to measure the board power consumption via software? I have read here: http://blogs.arm.com/software-enablement/925-linux-hwmon-power-management-and-arm-ds-5-streamline/ that it is possible with the ARM Versatile boards, through the hwmon framework and lm_sensors. However, when I run lm_sensors on the Arndale board, no sensors were found. Do you know about any other possible ways to measure power in software? Maybe it is possible to communicate with the on-board PMIC? Maybe there are some registers where information about the power/voltage provided to the processor and the other components is available?
>>
>> On ARM Versatile express boards and the coretiles that come with it,
>> we have sensors which are probed through hwmon framework in
>> Linux. So, we have hardware IPs present on board which let us
>> get some power figures per cluster for big LITTLE.
>>
>> I am not sure if Exynos have any such things on it.
>>
>> @Chander: Are you aware of any such features?
>>
>> > 2) Recently I have read Andy Green’s presentation “How to measure SoC power”. However, by measuring power on the PMIC input side through the ARM Energy Probe, probably I won't be able to see the effect of DVFS. Do you have any suggestions on how to measure the effect of DVFS, even through hardware measurements?
>>
>> You need probes on the voltage regulator which is feed the cores...
>> But again, that is very much hardware specific. And I haven't worked
>> on Exynos at all :)
>>
>> > 3) More in general, I do not know which is the best way to implement custom policies of DVFS.
>>
>> I didn't get you here. Are you talking about tuning of governors here?
>>
>> > Is it possible, maybe through appropriate API's, to access the cpu_idle and the cpu_freq framework from inside my application? Shall I work directly with the drivers of the PMIC? Is it possible to set the voltage directly from inside my application?
>
> Are you trying to create a DVFS policy from a userspace application?
> Lots of people hack together something using the CPUfreq "userspace"
> governor and writing to:
> /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
>
> This is not something that should be shipped on a product but is useful
> for learning and prototyping. It only affects the CPU and will not help
> you craft DVFS policies on other peripherals/devices.
>
> Regards,
> Mike
>
>>
>> Something on the board must provide this to kernel. Kernel can't
>> get it by itself.
>>
>> _______________________________________________
>> linaro-kernel mailing list
>> linaro-kernel@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/linaro-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-26  6:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <611CFE9D6FBBDC4B97935A5287A11345014441@XSERVER21B.campus.tue.nl>
2013-07-16  6:43 ` Arndale power management Viresh Kumar
2013-07-16  7:23   ` Lukasz Majewski
2013-07-17 11:33     ` Mark Brown
2013-07-16  8:48   ` Andy Green
2013-07-25  1:58   ` Mike Turquette
     [not found]     ` <611CFE9D6FBBDC4B97935A5287A1134501BB6D@XSERVER21B.campus.tue.nl>
     [not found]       ` <CAPtuhTg3YdTGy58UT9gVmp9EZNBwxaqv69A8nv_Gackyc5qc5Q@mail.gmail.com>
2013-07-26  6:06         ` Comaschi, F.

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.