From: Igor Stoppa <igor.stoppa@nokia.com>
To: ext Dmitry Krivoschekov <dmitry.krivoschekov@gmail.com>
Cc: linux-pm@lists.osdl.org,
Dominik Brodowski <linux@dominikbrodowski.net>,
Pavel Machek <pavel@ucw.cz>
Subject: Re: Alternative Concept
Date: Tue, 20 Mar 2007 17:36:45 +0200 [thread overview]
Message-ID: <1174405005.25744.108.camel@Dogbert.NOE.nokia.com> (raw)
In-Reply-To: <45FFF697.8080101@gmail.com>
On Tue, 2007-03-20 at 17:58 +0300, ext Dmitry Krivoschekov wrote:
> Igor Stoppa wrote:
> > On Tue, 2007-03-20 at 16:07 +0300, ext Dmitry Krivoschekov wrote:
> >> Igor Stoppa wrote:
> >>> On Tue, 2007-03-20 at 12:45 +0300, ext Dmitry Krivoschekov wrote:
> >>>> David Brownell wrote:
> >>>>> On Monday 19 March 2007 5:03 pm, Dmitry Krivoschekov wrote:
> >>>>>> David Brownell wrote:
> >>>>>>> On Sunday 18 March 2007 1:25 pm, Dmitry Krivoschekov wrote:
> >>>>>>>> Sometimes it's quite reasonable to make decisions (or policy)
> >>>>>>>> at the low level, without exposing events to higher layers,
> >>>>>>> Of course. Any layer can incorporate a degree of policy.
> >>>>>> But users should be able to choose to use or do not use the incorporated
> >>>>>> policy, shouldn't they?
> >>>>> Sometimes. What's a user?
> >>>> It's a user of a kernel subsystem that (subsystem ) keeps a policy,
> >>>> i.e. a user it's another kernel subsystem or userspace application,
> >>>> it depends on implementation of a system.
> >>>>> Do you really expect every single
> >>>>> algorithm choice to be packaged as a pluggable policy?
> >>>> I didn't say pluggable policy, I just said there are must be
> >>>> an alternative - "use" or "do not use" a predefined policy.
> >>>> For example, in USB you are able to enable/disable autosuspend rule,
> >>>> don't know if it's possible to disable it at runtime though.
> >>>>> Any
> >>>>> time I've seen systems designed that way, those pluggabilty
> >>>>> hooks have been a major drag on performance and maintainability.
> >>>>>
> >>>>> Most components don't actually _need_ a choice of policies.
> >>>>>
> >>>>>
> >>>> Yes, but they at least need a mechanism to disable an associated policy,
> >>>> upper layers should be able to decide where the policy well be kept,
> >>>> they may delegate the keeping to lower layers but also may want to
> >>>> keep the policy themselves for some reason.
> >>> That sounds more like it's driven by IP than by technical reasons.
> >> Linux - Operating system, the key word is "system", doing things on
> >> one layer you have to think how it is refleceted to other layers, so
> >> here are not bare technical questions.
> >>> Anyway in the USB example mentioned the rule is very high level,
> >> What level can be lower than driver level?
> > Enable/disable autosuspend is certainly higher level command than
> > forcing a clock that a driver is using.
> Please re-read what you wrote, "Anyway in the USB example mentioned the
> rule is very high level",
> by the rule I assume "suspend a device if it doesn't need for USB
> interface for now", I didn't consider
> enabling/disabling the rule itself here.
And you were correct. It _is_ high level if it refers to the whole
device rather than directly to a resource used by the device, like a
clock.
> >> I agree, USB stack consist of a number of drivers but all of them
> >> belongs to one, USB, subsystem, more precisely USB host subsystem
> >> (considering the case with AUTOSUSPEND)
> >>
> >> Driver level is serving the lowest level - interacting with particular
> >> system device, while layer serving system clocks is higher by default
> >> since clocks are usually distributed for several devices in the system,
> >> and you need a common knowledge then. Putting the knowledge to driver
> >> layer means duplicating of the knowledge for each driver.
> > I really can't immagine how you have read this into what i wrote.
> Just think of that then, I don't insist though :)
> >
> >>> while
> >>> here the proposal is to meddle with the internals of a driver.
> >>> It seems more logical to implement policies/rules at driver level,
> >>> rather than going straight for the resources of the driver.
> >>>
> >>> Why can't the driver itself be able to translate whatever high-level
> >>> command/hint it receives into the platform/arch/board specific actions?
> >> Assuming we consider normal device driver, because it needs to coordinate
> >> actions with a number of other drivers in this case, and also for the reason
> >> I mentioned in previous comment.
> >>
> >> And you should definitely read the first chapter of the "Linux Device
> >> drivers" book,
> >> see "The Role of the Device Driver" section.
> > I'll try to reformulate, so maybe this time you won't jump to such funny
> > conclusions:
> It's not a conclusion it's a suggestion, there you may find explanations
> what is wrong
> with delegating policies to device drivers.
Your approach is to just label policy what you want to kick out of the
driver =) Nice one!
acquire_resource_before_proceeding/release_resource_when_done
that's a mechanism; the _policy_ is to tell the driver what "when done"
means. At it can be done dynamically.
> > case 1-you are speaking in favour of a framework where policies can
> > orchestrate system level decisions by having a strict control on every
> > shared resource
> I personally don't favor any approach I just want to sort out advantages
> and disadvantages
> of every approach.
> > case 2-i'm saying that it is simpler to rely on drivers doing their job,
> What criteria do you use to accept one approach is simpler than another?
case 2 is already in place for OMAP2, to prevent retention in certain
cases, you can check the code. It works and has very little impact in
terms of code. Furthermore only the drivers that need it are affected.
> > as they are doing right now, on OMAP, at least, of releasing resources
> Did you think of other archs?
well, this is linux-pm ml, so i felt that it was correct to delimit the
current playground; it's to
> > when not needed. Based on this default behavior, there might be certain
> > cases when a system-level manager can interact with them by making the
> the system-level manager has to be arch-dependent in this case
but very trivial; there's no point in having something
cross-architecture if it initroduces unnecessary complexity just for the
sake of it. Better stick to a cross platform interface and let the
details to arch-specific code.
> > _localised_ power saving less aggressive, thus optimiising the global
> > saves/performance. So if others than you are happy with just the
> > distributed approach, they can avoid using the framework, while you can
> > just put it on top and achive the same power saving that you would get
> > in case 1
> Ok, seems you are happy with current clock framework and advocating it
> to be as is.
As I wrote several times i haven't seen yet a reason to replace it;
certainly there is space for improvement but so far this proposal has
not been on the lines of: how to improve the clk fw
> Are you against addition some features to it, such as enable/disable
> "turn the unused clock off"
> rule, set/get state of associated clock device (to control low power
> modes of the clock device itself)?
> Besides that it is meaningless for you, do you have any technical
> objections for that?
Do you mean apart from the fact that it means hijacking the fw?
Noooo, not at all.
But why is it meaningful to you? Why can't you interact with the entity
that is actually controlling a certain clock, rather than with the clock
itself?
>
>
> Thanks,
> Dmitry
>
--
Cheers, Igor
Igor Stoppa <igor.stoppa@nokia.com>
(Nokia Multimedia - CP - OSSO / Helsinki, Finland)
next prev parent reply other threads:[~2007-03-20 15:36 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
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 [this message]
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=1174405005.25744.108.camel@Dogbert.NOE.nokia.com \
--to=igor.stoppa@nokia.com \
--cc=dmitry.krivoschekov@gmail.com \
--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