public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC] PowerOP Take 3, sysfs UI core 2/5
@ 2006-07-26 23:55 Gross, Mark
  2006-08-01 11:16 ` Matthew Locke
  2006-08-05 12:05 ` Pavel Machek
  0 siblings, 2 replies; 26+ messages in thread
From: Gross, Mark @ 2006-07-26 23:55 UTC (permalink / raw)
  To: Eugeny S. Mints, linux-pm
  Cc: Mochel, Patrick, Matthew Locke, sampsa.fabritius, linux



>-----Original Message-----
>From: Eugeny S. Mints [mailto:eugeny.mints@gmail.com]
>Sent: Thursday, July 20, 2006 1:00 PM
>To: linux-pm@lists.osdl.org
>Cc: Matthew Locke; toddpoynor@gmail.com; linux@dominikbrodowski.net;
Gross, Mark;
>igor.stoppa@nokia.com; amit.kucheria@nokia.com;
sampsa.fabritius@nokia.com; r-woodruff2@ti.com;
>Mochel, Patrick
>Subject: Re: [RFC] PowerOP Take 3, sysfs UI core 2/5
>
>Now with patch attached.
>Sorry.
>
>2006/7/20, Eugeny S. Mints <eugeny.mints@gmail.com>:
>> A sysfs interface for PowerOP that allows operating points to be
created
>> and activated from userspace.
>>
>> The platform-specific backend provides the code to read and write
sysfs
>> attributes for each power parameter; the core sysfs interface has no
>> knowledge of the struct powerop_point contents.  This interface could
be
>> seen as possible extension of cpufreq sysfs.  It is not
>> an integral part of PowerOP and is provided in part to facilitate
>> discussion and experimentation with PowerOP, but could serve as a
basis
>> for a basic userspace power policy management stack.
>>
>> Operating points are created by writing the name of the operating
point
>> to /sys/powerop/new.  This may be a job for configfs.
>> /sys/powerop/<op>/ will contain an attribute for each power parameter
>> that may be written to set the associated parameter for the new
>> operating point.  An operating point may be activated by writing its
>> name to /sys/powerop/active.  The hardware power parameters currently
>> set may be read and written via /sys/powerop/hw/, a special operating
>> point that reads and writes parameter attribute values immediately,
>> primarily for diagnostic purposes.
>>
>> Buried in this interface is also the notion of a registry of "named
>> operating points", allowing operating points created by some other
>> interface (such as cpufreq or loading a module with the definitions
as
>> suggested previously by David Brownell) to be activated from
userspace
>> via /sys/powerop/active.
>>
>> Please note that the interface is not hooked up with the rest of the
code
>> yet and is provided just for reference/review.

Drivers/powerop/powerop_sysfs.c : includes asm/powerop.h and will not
compile on i386.
There are other places where it will not compile for non-omap
architectures.  The architecture independent code should build for all
architectures.

Now just rambling a bit, while catching up on the email thread some of
this may be wrong but....

Is it realistic to have the dimensionality of the operating points
defined at the architecture level?  Why couldn't there be multiple types
of operating points based on presence of different peripherals?  Having
the array defined at compile time seems wrong.  Couldn't the platform
startup code enumerate all its power control knobs and define the number
of parameters per operating point, or have one have the dimensions grow
with platform power drivers, one per control knob?

While we are at it, would it make more sense to define the UI for the
operating points in some way that exports mins, max, and target values
for each dimension?

Would it make sense to have the different dimensions broken out into
separate sysfs entries / attributes?

Would it also make sense to support multiple powerop_driver instances?
Powerop.c can only register one powerop_driver instance at a time.  What
if I want to break up my power management into multiple powerop_driver
(power, voltage, clock) domains?  Being stuck defining a large n-tuple
space of operating points at compile time doesn't work for me.  I want
to have them at least built up at startup time, and preferably
associated with some platform power driver loading operation.

--mgross

PS I'm sorry for using outlook on this email thread  I know I'm going to
regret it more than I all ready do....

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: [RFC] PowerOP Take 3, sysfs UI core 2/5
@ 2006-07-27  0:30 Gross, Mark
  0 siblings, 0 replies; 26+ messages in thread
From: Gross, Mark @ 2006-07-27  0:30 UTC (permalink / raw)
  To: Matthew Locke, David Brownell
  Cc: Mochel, Patrick, linux-pm, sampsa.fabritius, Pavel Machek, linux



>-----Original Message-----
>From: linux-pm-bounces@lists.osdl.org
[mailto:linux-pm-bounces@lists.osdl.org] On Behalf Of Matthew
>Locke
>Sent: Wednesday, July 26, 2006 12:45 AM
>To: David Brownell
>Cc: Mochel, Patrick; Pavel Machek; linux-pm@lists.osdl.org;
sampsa.fabritius@nokia.com;
>linux@dominikbrodowski.net
>Subject: Re: [linux-pm] [RFC] PowerOP Take 3, sysfs UI core 2/5
>
>
>On Jul 24, 2006, at 11:48 AM, David Brownell wrote:
>
>> On Monday 24 July 2006 10:29 am, Pavel Machek wrote:
>>
>>> That looks quite ugly to do in sysfs, indeed.
>>
>> Yes, it's long been one of the things I most dislike about this
>> PowerOP thing.
>> Not just the UI, but the models it reflects.
>>
>> So I was glad to see it split out as fully optional... although from
>> what I
>> see, the internal models in the code have derived from this sysfs
>> model, so
>> I'd argue those need to change too.
>
>Is there something specific in the internal model that are you
>referring to?
>
>>
>> It'd be lots better to just have named operating points that get
>> selected just
>> the /sys/power/state file selects the, erm, "sleep point".
>
>I've tried to fit sleep into the operating point concept before but
>sleep always ends up being a special case.   The code has to check to
>see if the selected operating the "sleep point" and call the suspend
>function.  I think tying in sleep to the op point concept needs more
>discussion and probably should be handled separately until we get
>further along with power op.
>
>btw, we are in complete agreement about using named points.  This first
>set of patches is meant to introduce the operating point concept into
>the kernel without requiring massive changes to cpufreq.  This layer
>extends the bottom part of cpufreq to enable the control of multiple
>parameters beyond just cpu frequency and voltage across architectures.
>Currently, cpufreq does not use named operating points so we need to
>make sure cpufreq can use the power op API and continue to function.
>This topic also ties into our other email discussion on creating op
>points and names are assigned to op points.

I'm sorry if I take things off into a too large of a tangent with this.

I've been wanting to try to get multiple power parameter control some
how integrated with cpufreq for a while now.  Call it an itch and I may
be all wet on the following:  

The way this plugs into the cpufreq code is from the architecture
dependent cpufreq_driver level.  I guess this is an easy first step, but
I wonder if / how something could be brought up to a higher level
somehow.  I don't know what this would look like at the moment.  But,
having a control system (cpufreq + governors) that control a single
variable, cpu frequency, that gets mapped into multi-variable control
(the operating point n-tuple) seems clunky to me.  

Could we do better or more with a multivariable control from the
beginning?

--mgross

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: [RFC] PowerOP Take 3, sysfs UI core 2/5
@ 2006-07-27  0:15 Gross, Mark
  0 siblings, 0 replies; 26+ messages in thread
From: Gross, Mark @ 2006-07-27  0:15 UTC (permalink / raw)
  To: Pavel Machek, Eugeny S. Mints
  Cc: Matthew Locke, Mochel, Patrick, linux-pm, sampsa.fabritius, linux



>-----Original Message-----
>From: linux-pm-bounces@lists.osdl.org
[mailto:linux-pm-bounces@lists.osdl.org] On Behalf Of Pavel
>Machek
>Sent: Monday, July 24, 2006 10:30 AM
>To: Eugeny S. Mints
>Cc: Matthew Locke; Mochel, Patrick; linux-pm@lists.osdl.org;
sampsa.fabritius@nokia.com;
>linux@dominikbrodowski.net
>Subject: Re: [linux-pm] [RFC] PowerOP Take 3, sysfs UI core 2/5
>
>Hi!
>
>> A sysfs interface for PowerOP that allows operating points to be
created
>> and activated from userspace.
>>
>> The platform-specific backend provides the code to read and write
sysfs
>> attributes for each power parameter; the core sysfs interface has no
>> knowledge of the struct powerop_point contents.  This interface could
be
>> seen as possible extension of cpufreq sysfs.  It is not
>> an integral part of PowerOP and is provided in part to facilitate
>> discussion and experimentation with PowerOP, but could serve as a
basis
>> for a basic userspace power policy management stack.
>>
>> Operating points are created by writing the name of the operating
point
>> to /sys/powerop/new.  This may be a job for configfs.
>
>That looks quite ugly to do in sysfs, indeed.
>
>And it definitely needs some Documentation/ patch. But better run this
>by lkml.

It's too soon for that.

--mgross

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: [RFC] PowerOP Take 3, sysfs UI core 2/5
@ 2006-07-27  0:14 Gross, Mark
  0 siblings, 0 replies; 26+ messages in thread
From: Gross, Mark @ 2006-07-27  0:14 UTC (permalink / raw)
  To: Eugeny S. Mints, linux-pm
  Cc: Mochel, Patrick, Matthew Locke, sampsa.fabritius, linux



>-----Original Message-----
>From: Eugeny S. Mints [mailto:eugeny.mints@gmail.com]
>Sent: Thursday, July 20, 2006 12:56 PM
>To: linux-pm@lists.osdl.org
>Cc: Matthew Locke; toddpoynor@gmail.com; linux@dominikbrodowski.net;
Gross, Mark;
>igor.stoppa@nokia.com; amit.kucheria@nokia.com;
sampsa.fabritius@nokia.com; r-woodruff2@ti.com;
>Mochel, Patrick
>Subject: [RFC] PowerOP Take 3, sysfs UI core 2/5
>
>A sysfs interface for PowerOP that allows operating points to be
created
>and activated from userspace.
>
>The platform-specific backend provides the code to read and write sysfs
>attributes for each power parameter; the core sysfs interface has no
>knowledge of the struct powerop_point contents.  This interface could
be
>seen as possible extension of cpufreq sysfs.  It is not
>an integral part of PowerOP and is provided in part to facilitate
>discussion and experimentation with PowerOP, but could serve as a basis
>for a basic userspace power policy management stack.
>
>Operating points are created by writing the name of the operating point
>to /sys/powerop/new.  This may be a job for configfs.

Why create a new top level sysfs entry?  Can't we just put power op
under /sys/devices/platform or /sys/power ?

>/sys/powerop/<op>/ will contain an attribute for each power parameter
>that may be written to set the associated parameter for the new
>operating point.  An operating point may be activated by writing its
>name to /sys/powerop/active.  The hardware power parameters currently
>set may be read and written via /sys/powerop/hw/, a special operating
>point that reads and writes parameter attribute values immediately,
>primarily for diagnostic purposes.

Whaaa?  Is this for creating named operating points like say,
full_speed, deep_idle, pay_back, ui points, that could be activated by
echoing their name to /sys/powerop/active ?

These aren't new points, just named existing ones.  Right?


>Buried in this interface is also the notion of a registry of "named
>operating points", allowing operating points created by some other
>interface (such as cpufreq or loading a module with the definitions as
>suggested previously by David Brownell) to be activated from userspace
>via /sys/powerop/active.

Would it make more sense to echo "active" to the named <op> sysfs node?

>
>Please note that the interface is not hooked up with the rest of the
code
>yet and is provided just for reference/review.

^ permalink raw reply	[flat|nested] 26+ messages in thread
* [RFC] PowerOP Take 3, sysfs UI core 2/5
@ 2006-07-20 19:56 Eugeny S. Mints
  2006-07-20 20:00 ` Eugeny S. Mints
  2006-07-24 17:29 ` Pavel Machek
  0 siblings, 2 replies; 26+ messages in thread
From: Eugeny S. Mints @ 2006-07-20 19:56 UTC (permalink / raw)
  To: linux-pm; +Cc: patrick.mochel, Matthew Locke, linux, sampsa.fabritius

A sysfs interface for PowerOP that allows operating points to be created
and activated from userspace.

The platform-specific backend provides the code to read and write sysfs
attributes for each power parameter; the core sysfs interface has no
knowledge of the struct powerop_point contents.  This interface could be
seen as possible extension of cpufreq sysfs.  It is not
an integral part of PowerOP and is provided in part to facilitate
discussion and experimentation with PowerOP, but could serve as a basis
for a basic userspace power policy management stack.

Operating points are created by writing the name of the operating point
to /sys/powerop/new.  This may be a job for configfs.
/sys/powerop/<op>/ will contain an attribute for each power parameter
that may be written to set the associated parameter for the new
operating point.  An operating point may be activated by writing its
name to /sys/powerop/active.  The hardware power parameters currently
set may be read and written via /sys/powerop/hw/, a special operating
point that reads and writes parameter attribute values immediately,
primarily for diagnostic purposes.

Buried in this interface is also the notion of a registry of "named
operating points", allowing operating points created by some other
interface (such as cpufreq or loading a module with the definitions as
suggested previously by David Brownell) to be activated from userspace
via /sys/powerop/active.

Please note that the interface is not hooked up with the rest of the code
yet and is provided just for reference/review.

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

end of thread, other threads:[~2006-08-07  4:31 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-26 23:55 [RFC] PowerOP Take 3, sysfs UI core 2/5 Gross, Mark
2006-08-01 11:16 ` Matthew Locke
2006-08-05 12:05 ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2006-07-27  0:30 Gross, Mark
2006-07-27  0:15 Gross, Mark
2006-07-27  0:14 Gross, Mark
2006-07-20 19:56 Eugeny S. Mints
2006-07-20 20:00 ` Eugeny S. Mints
2006-07-24 17:29 ` Pavel Machek
2006-07-24 18:48   ` David Brownell
2006-07-24 19:35     ` Pavel Machek
2006-07-24 19:40       ` Matthew Locke
2006-07-24 21:46       ` David Brownell
2006-07-24 21:58         ` Preece Scott-PREECE
2006-07-25  0:32           ` David Brownell
2006-07-25 10:09             ` Amit Kucheria
2006-07-26  5:05               ` David Brownell
2006-07-26  7:24                 ` Matthew Locke
2006-08-05 12:09                   ` Pavel Machek
2006-08-07  4:31                     ` Vitaly Wool
2006-07-26 21:11                 ` Eugeny S. Mints
2006-07-27  0:58                   ` David Brownell
2006-07-26  7:44     ` Matthew Locke
2006-07-26 15:03       ` Christian Krafft
2006-07-27  0:55       ` David Brownell
2006-08-01 10:45         ` Matthew Locke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox