From: "Eugeny S. Mints" <eugeny.mints@gmail.com>
To: David Brownell <david-b@pacbell.net>
Cc: linux-pm@lists.osdl.org,
Dominik Brodowski <linux@dominikbrodowski.net>,
Pavel Machek <pavel@ucw.cz>
Subject: Re: Alternative Concept
Date: Thu, 15 Mar 2007 12:53:33 +0300 [thread overview]
Message-ID: <45F9179D.2090706@gmail.com> (raw)
In-Reply-To: <200703141019.06641.david-b@pacbell.net>
David Brownell wrote:
> This alternative "concept" would seem to be missing a few essential
> aspects. Like proposed interfaces, for starters ...
stay tuned - it follows ;)
>
>
> On Wednesday 14 March 2007 3:43 am, Eugeny S. Mints wrote:
>>> Would this involve replacing the clock framework, or are they going to coexist?
>> parameter framework would eventually replace clock framework.
>
> That seems to be the wrong answer. Especially since nothing has
> been shown to be wrong with the clock interface; much less to be
> unfixably wrong (hence justifying replacement).
a cherry-picking on clk fw API:
- clk_set_rate() sticks to an individual clock - no way to set rates for number
of clocks at once instead of having series of clk_set_rate() calls. The former
for example is required for clocks which have required predefined ratio
dependency though: two clocks always have to be n:2n and any other ratio leads
to hardware misbehavior. So, you can't go from 100:200 to 300:600 via series of
clk_set_rate() for such clocks, i.e. 100:200 -> 300:200 -> 300:600 or 100:200 ->
100:600 -> 300:600 (see SH7722 hw for reference)
- only a rate can be set up via clk_set_rate() while for a PLL I want to set up
a desired idle state as well (btw there can be more than one idle state)
- current API does not provide support for clock domains
a cherry-picking on clk fw implementation:
- clock tree structure and traversing clock tree code are duplicated in every
architecture while can be done in arch independent way and just once (hint: what
indeed is an arch specific thing it's a clock tree configuration)
>
>
>> Separate clock and
>> voltage frameworks lead to code and functionality duplication and do not address
>> such things as relationship between clocks and voltages, clock/voltage/power
>> domains, etc needed for aggressive power management.
>
> Most clocks don't have those issues. Why penalize all clocks for
> issues which only relate to a few? Better to only do that for the
> few cocks which have such additional constraints.
parameter fw would give exactly this behavior: relationship between clocks and
voltages, clock/voltage/power domains implementation would be just additional
arcs between nodes for clock and voltages. Nowadays clk fw has only one type of
arcs - parent-child type. parameter fw would bring additional types. But clock
nodes would be linked just with required arcs (of required type; both are arch
specific things) so for an arch without any additional dependencies between
clocks (and voltages) parameter fw would end up with exactly equivalent clock
tree as clk fw for the arch has today.
>
> Plus, remember that the clock framework is an interface ... so by
> definition, it has no code associated with it. Hence no duplication
> of code is possible... at least at this hand-wavey "concept" level.
> Possibly a given implementation has scope for code sharing; but I
> doubt it. Code behind a given implementation of the clock interface
> is invariably quite slim.
and invariably looks like a hack and still duplicate clock tree building and
traversing code. Dependencies which exist in modern hw between clocks, clocks
and voltages require a more straight and standard technique to be set up for
implementing clk/vltg/name_it framework. Moving most of the code to be arch
independent and setting a clear rules on how a clock/vltg tree configuration
would look like while just looking at a hw manual would help.
>
> If a clock being enabled implies a power or voltage domain being active,
> there's no reason that constraint shouldn't be enforced by whatever
> implementation a given platform uses.
true. but it's the same functionality required on different arches. and it can
be done in arch independent way without penalties for arches which do not
require the functionality. What's the rationale to move it down to arch specific
code then?
>
> And having a generic -- basically untyped -- notion of "parameter"
> seems significantly less good than having a typed notion, with
> type-specific operations.
there is no type-specific operations. clk_set_rate() and vltg_set() basically do
the same thing - set a value for a pm resource provided by clock or voltage
device (regulator). The difference is that output of clock regulator is measured
in Hz and named 'frequesncy' and output of voltage regulator os measured in mV
and named 'voltage' which actually does not matter from API POV. So, i see more
sense in having param_set(), parame_set_state() (set_state primitive for idle
states) rather than in
clk_set_rate(), clk_set_state()
vltg_set(), vltg_set_state()
and, our analysis shows that you would end up with a separate type for domains,
so it would be at least
domain_set_state() as well.
> Typed notions are easier to understand,
> read, and maintain.
common, after tricks with spinlocks in [merged!] RT patches? ;)
Eugeny
>
>
>> Basically a good way of thinking about parameter framework is that parameter
>> framework would start from existed clock framework and gradually evolve by
>> addressing voltages, relationship between clocks and voltages, domains.
>> Eventually clock framework functionality would be a part of power parameter
>> framework.
>
> A better way would be to say that implementions of the clock interface
> on a given platform can build on whatever they need to build. That might
> include a "parameter" framework, if such a thing were defined in such
> a way that it became useful to such implementations.
>
> - Dave
>
>
next prev parent reply other threads:[~2007-03-15 9:53 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-24 1:23 [RFC] CPUFreq PowerOP integration, Intro 0/3 Eugeny S. Mints
2006-10-07 2:36 ` Alternative Concept [Was: Re: [RFC] CPUFreq PowerOP integration, Intro 0/3] Dominik Brodowski
2006-10-07 3:15 ` Dominik Brodowski
2006-10-08 7:16 ` Pavel Machek
2006-10-12 15:38 ` Mark Gross
2006-10-12 16:02 ` Dominik Brodowski
2006-10-16 21:56 ` Mark Gross
2006-10-17 21:40 ` Matthew Locke
2006-10-12 16:48 ` Pavel Machek
2006-10-12 17:12 ` Vitaly Wool
2006-10-12 17:23 ` Pavel Machek
2006-10-09 18:21 ` Mark Gross
2006-10-26 3:06 ` Dominik Brodowski
2006-10-12 22:43 ` Eugeny S. Mints
2006-10-13 10:55 ` Pavel Machek
2006-10-16 21:44 ` Mark Gross
2006-10-17 8:26 ` Pavel Machek
2006-10-26 3:05 ` Dominik Brodowski
2007-03-13 0:57 ` Alternative Concept Matthew Locke
2007-03-13 11:08 ` Pavel Machek
2007-03-13 20:34 ` Mark Gross
2007-03-14 2:30 ` Ikhwan Lee
2007-03-14 10:43 ` Eugeny S. Mints
2007-03-14 17:19 ` David Brownell
2007-03-14 18:12 ` Igor Stoppa
2007-03-14 18:45 ` David Brownell
2007-03-15 9:53 ` Eugeny S. Mints [this message]
2007-03-15 13:04 ` Igor Stoppa
2007-03-16 2:21 ` David Brownell
2007-03-16 3:56 ` Ikhwan Lee
2007-03-16 6:17 ` David Brownell
2007-03-19 2:27 ` Ikhwan Lee
2007-03-19 6:07 ` David Brownell
2007-03-16 13:06 ` Dmitry Krivoschekov
2007-03-16 18:03 ` David Brownell
2007-03-18 20:25 ` Dmitry Krivoschekov
2007-03-19 4:04 ` David Brownell
2007-03-20 0:03 ` Dmitry Krivoschekov
2007-03-20 8:07 ` David Brownell
2007-03-20 9:45 ` Dmitry Krivoschekov
2007-03-20 10:30 ` Igor Stoppa
2007-03-20 12:13 ` Eugeny S. Mints
2007-03-20 12:39 ` Igor Stoppa
2007-03-20 13:44 ` Dmitry Krivoschekov
2007-03-20 21:03 ` David Brownell
2007-03-20 13:07 ` Dmitry Krivoschekov
2007-03-20 13:52 ` Igor Stoppa
2007-03-20 14:58 ` Dmitry Krivoschekov
2007-03-20 15:36 ` Pavel Machek
2007-03-20 19:16 ` Dmitry Krivoschekov
2007-03-20 20:45 ` Pavel Machek
2007-03-20 22:04 ` David Brownell
2007-03-20 22:06 ` Pavel Machek
2007-03-20 23:29 ` David Brownell
2007-03-20 15:36 ` Igor Stoppa
2007-03-20 19:17 ` Dmitry Krivoschekov
2007-03-20 20:17 ` David Brownell
2007-03-20 20:21 ` David Brownell
2007-03-20 19:58 ` David Brownell
2007-03-24 0:47 ` charging batteries from USB [was: Re: Alternative Concept] Dmitry Krivoschekov
2007-03-24 1:17 ` David Brownell
2007-03-24 1:48 ` Dmitry Krivoschekov
2007-03-24 2:35 ` David Brownell
2007-03-24 10:20 ` Oliver Neukum
2007-03-24 8:36 ` Oliver Neukum
2007-03-14 3:19 ` Alternative Concept Dominik Brodowski
-- strict thread matches above, loose matches on Subject: below --
2007-03-14 22:08 Scott E. Preece
2007-03-14 23:23 ` David Brownell
2007-03-15 7:25 ` Ikhwan Lee
2007-03-15 8:14 ` Amit Kucheria
2007-03-15 10:55 ` Eugeny S. Mints
2007-03-15 10:46 ` Eugeny S. Mints
2007-03-15 10:33 ` Eugeny S. Mints
2007-03-15 13:21 Scott E. Preece
2007-03-15 13:29 Scott E. Preece
2007-03-15 23:07 ` David Brownell
2007-03-15 14:00 Scott E. Preece
2007-03-15 14:38 ` Eugeny S. Mints
2007-03-15 17:33 ` Woodruff, Richard
2007-03-19 14:12 Scott E. Preece
2007-03-20 7:56 ` David Brownell
2007-03-20 14:26 ` Amit Kucheria
2007-03-20 15:08 ` Dmitry Krivoschekov
2007-03-20 17:04 ` David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45F9179D.2090706@gmail.com \
--to=eugeny.mints@gmail.com \
--cc=david-b@pacbell.net \
--cc=linux-pm@lists.osdl.org \
--cc=linux@dominikbrodowski.net \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox