From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: David Brownell <david-b@pacbell.net>
Cc: Alan Stern <stern@rowland.harvard.edu>,
pm list <linux-pm@lists.linux-foundation.org>,
Pavel Machek <pavel@ucw.cz>,
linux acpi <linux-acpi@vger.kernel.org>
Subject: Re: [linux-pm] Re: [RFD] How to tell ACPI drivers what the target sleep state is (was: Re: [PATCH 1/2] acpi choose sleep state help)
Date: Thu, 21 Jun 2007 22:35:23 +0200 [thread overview]
Message-ID: <200706212235.23947.rjw@sisk.pl> (raw)
In-Reply-To: <200706211251.52952.david-b@pacbell.net>
On Thursday, 21 June 2007 21:51, David Brownell wrote:
> On Thursday 21 June 2007, Alan Stern wrote:
> > On Thu, 21 Jun 2007, David Brownell wrote:
> > > On Thursday 21 June 2007, Alan Stern wrote:
> > > >
> > > > _How_ does the provider know what the next target state is?
> > >
> > > That's an interface between the provider and the platform's PM code.
> > > Remember those two patches?
> > > ...
> >
> > Now we're getting back to the question which started this thread.
> > That patch takes care of one platform, but now consider an ACPI system.
> > How should the ACPI core learn what the next target system state will
> > be?
>
> The original patch -- to which the previous $SUBJECT patch was
> an update -- did more or less the same thing: pm_ops recorded
> the ACPI target state ...
>
>
> > And once it possess that knowledge, what's the best way for it to
> > tell various subsystems which device states/functions will be
> > supported?
>
> ... and then exposed a method returning ACPI_STATE_Sx values,
> called by non-core ACPI code.
But we have changed the suspend code ordering and the state
recorded by pm_ops only becomes known to ACPI _after_ we have suspended
devices.
That's what this thread is all about, BTW.
> At which point your narrative falters. What it's exposed to is
> not a subsystem ... but ACPI versions of hooks invoked by the
> subsystem. For PCI, to be specific.
>
> That is, the knowledge of that target sleep state never leaves
> that platform's PM code. (In this case, ACPI; including its PCI
> support, which lives in drivers/pci not drivers/acpi.) Because
> no subsystem other than ACPI itself should care how ACPI does any
> of its PM stuff.
All of this is fine, but we need some way to tell ACPI what the next sleep
state will be, because currently _we_ _have_ _not_ one.
So, do we introduce an additional pm_op to do that or are we going to do
something else?
> > > Of course, I believe we need to move away from "suspend_state_t"
> > > being effectively just "standby" or "STR" (or "ON") so that more
> > > of the hardware capabilities can be exposed. Systems that have,
> > > say, seven different hardware states can't fit into Linux today.
> >
> > I agree that the list of system states should be configurable and
> > perhaps even adjustable at runtime. However this is somewhat OT.
>
> Only slightly; remember, a main reason Linux has so few states is
> that PCs don't use any more. There are a number of PC-specific
> models and assumptions lurking in this area. One of them is that
> the target sleep state is anything more than a stepping-stone to
> the important platform-specific information.
As far as my original question is concerned, this is OT.
> > > (Related, I think that target *run* states are under-appreciated.
> > > That's the general runtime PM issue. Interfaces should work for
> > > run-state transitions as well as sleep-state ones...)
> >
> > Perhaps something like this: Resource providers have an API whereby
> > drivers can find out what resources either are currently available or
> > will be available in the next system state (a little awkward to specify
> > which is needed). Then drivers decide on a new device state based on
> > the type of change requested and the available resources, and notify
> > the providers via a second API about any change in resource usage.
>
> Resource providers have interfaces (*) they expose; yes. *IF* those
> resources change availability based on system states, there must be
> interfaces drivers can use to notice that. The providers already have
> interfaces to manage resources, and won't need new cals for that.
>
> The calls to expose whether a given in-use resource must be released
> or modified would be simplest if they're just query calls made by
> driver suspend()/resume() methods, but there's also something to be
> said for callbacks in certain contexts.
>
> (*) "API" == "Application Programming Interface", a userspace thing.
> So I avoid using that TLA for anything inside the OS kernel.
Agreed.
Greetings,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
next prev parent reply other threads:[~2007-06-21 20:28 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-19 2:33 [PATCH 1/2] acpi choose sleep state help Shaohua Li
2007-06-19 11:52 ` Rafael J. Wysocki
2007-06-19 22:00 ` Rafael J. Wysocki
2007-06-20 6:18 ` Shaohua Li
2007-06-20 11:32 ` [RFD] How to tell ACPI drivers what the target sleep state is (was: Re: [PATCH 1/2] acpi choose sleep state help) Rafael J. Wysocki
2007-06-20 11:32 ` Rafael J. Wysocki
2007-06-20 14:08 ` [linux-pm] " Alan Stern
2007-06-20 14:36 ` Rafael J. Wysocki
2007-06-20 14:36 ` Rafael J. Wysocki
2007-06-21 6:57 ` David Brownell
2007-06-20 14:08 ` Alan Stern
2007-06-21 1:51 ` Len Brown
2007-06-21 1:51 ` Len Brown
2007-06-21 7:10 ` David Brownell
2007-06-21 7:04 ` David Brownell
2007-06-21 12:42 ` Rafael J. Wysocki
2007-06-21 13:03 ` Pavel Machek
2007-06-21 13:03 ` Pavel Machek
2007-06-21 14:46 ` Rafael J. Wysocki
2007-06-21 14:46 ` Rafael J. Wysocki
2007-06-21 15:23 ` Alan Stern
2007-06-21 15:23 ` [linux-pm] " Alan Stern
2007-06-21 19:41 ` Rafael J. Wysocki
2007-06-21 19:41 ` [linux-pm] " Rafael J. Wysocki
2007-06-21 16:35 ` David Brownell
2007-06-21 16:35 ` David Brownell
2007-06-21 19:42 ` Rafael J. Wysocki
2007-06-21 19:42 ` Rafael J. Wysocki
2007-06-21 15:37 ` David Brownell
2007-06-21 15:37 ` David Brownell
2007-06-21 18:59 ` Pavel Machek
2007-06-21 18:59 ` [linux-pm] " Pavel Machek
2007-06-21 20:03 ` David Brownell
2007-06-21 20:03 ` [linux-pm] " David Brownell
2007-06-21 20:37 ` Rafael J. Wysocki
2007-06-21 20:37 ` [linux-pm] " Rafael J. Wysocki
2007-06-21 19:52 ` Rafael J. Wysocki
2007-06-21 19:52 ` Rafael J. Wysocki
2007-06-21 14:48 ` David Brownell
2007-06-21 20:04 ` Rafael J. Wysocki
2007-06-21 20:22 ` David Brownell
2007-06-21 20:41 ` Rafael J. Wysocki
2007-06-21 20:41 ` Rafael J. Wysocki
2007-06-21 20:22 ` David Brownell
2007-06-21 20:04 ` Rafael J. Wysocki
2007-06-21 14:48 ` David Brownell
2007-06-21 12:42 ` Rafael J. Wysocki
2007-06-21 15:56 ` Alan Stern
2007-06-21 16:35 ` David Brownell
2007-06-21 16:35 ` [linux-pm] " David Brownell
2007-06-21 17:11 ` Alan Stern
2007-06-21 18:02 ` David Brownell
2007-06-21 18:02 ` [linux-pm] " David Brownell
2007-06-21 18:51 ` Alan Stern
2007-06-21 19:51 ` David Brownell
2007-06-21 19:51 ` [linux-pm] " David Brownell
2007-06-21 20:35 ` Rafael J. Wysocki [this message]
2007-06-21 20:46 ` David Brownell
2007-06-21 21:02 ` Rafael J. Wysocki
2007-06-21 21:02 ` [linux-pm] " Rafael J. Wysocki
2007-06-21 21:04 ` Alan Stern
2007-06-21 21:04 ` [linux-pm] " Alan Stern
2007-06-23 22:00 ` [RFC][PATCH -mm] PM: Introduce set_target method in pm_ops Rafael J. Wysocki
2007-06-23 23:46 ` Alan Stern
2007-06-23 23:46 ` Alan Stern
2007-06-24 0:03 ` Rafael J. Wysocki
2007-06-24 0:03 ` Rafael J. Wysocki
2007-06-24 0:28 ` Alan Stern
2007-06-24 9:52 ` Johannes Berg
2007-06-24 9:52 ` [linux-pm] " Johannes Berg
2007-06-24 11:49 ` Igor Stoppa
2007-06-24 11:49 ` [linux-pm] " Igor Stoppa
2007-06-24 13:04 ` Rafael J. Wysocki
2007-06-24 13:04 ` Rafael J. Wysocki
2007-06-24 12:57 ` Rafael J. Wysocki
2007-06-24 12:57 ` Rafael J. Wysocki
2007-06-25 0:01 ` David Brownell
2007-06-25 22:14 ` Rafael J. Wysocki
2007-06-25 22:14 ` Rafael J. Wysocki
2007-06-25 0:01 ` David Brownell
2007-06-24 0:28 ` Alan Stern
2007-06-25 13:04 ` Pavel Machek
2007-06-25 13:57 ` [linux-pm] " Dmitry Krivoschekov
2007-06-25 19:28 ` Pavel Machek
2007-06-25 22:16 ` Rafael J. Wysocki
2007-06-25 22:16 ` [linux-pm] " Rafael J. Wysocki
2007-06-25 19:28 ` Pavel Machek
2007-06-25 13:57 ` Dmitry Krivoschekov
2007-06-25 13:04 ` Pavel Machek
2007-06-23 22:00 ` Rafael J. Wysocki
2007-06-21 20:46 ` Re: [RFD] How to tell ACPI drivers what the target sleep state is (was: Re: [PATCH 1/2] acpi choose sleep state help) David Brownell
2007-06-21 20:35 ` Rafael J. Wysocki
2007-06-21 21:00 ` Platform-specific system power states Alan Stern
2007-06-22 19:49 ` David Brownell
2007-06-22 21:30 ` Rafael J. Wysocki
2007-06-23 1:32 ` Alan Stern
2007-06-23 20:20 ` Rafael J. Wysocki
2007-06-25 0:10 ` David Brownell
2007-06-25 22:59 ` Rafael J. Wysocki
2007-06-25 0:26 ` David Brownell
2007-06-25 23:04 ` Rafael J. Wysocki
2007-06-21 20:19 ` Re: [RFD] How to tell ACPI drivers what the target sleep state is (was: Re: [PATCH 1/2] acpi choose sleep state help) Rafael J. Wysocki
2007-06-21 20:19 ` [linux-pm] " Rafael J. Wysocki
2007-06-21 20:32 ` David Brownell
2007-06-21 20:50 ` Rafael J. Wysocki
2007-06-21 20:50 ` Rafael J. Wysocki
2007-06-21 20:32 ` David Brownell
2007-06-21 18:51 ` Alan Stern
2007-06-21 17:11 ` Alan Stern
2007-06-20 11:32 ` Rafael J. Wysocki
2007-06-21 7:14 ` [PATCH 1/2] acpi choose sleep state help 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=200706212235.23947.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=david-b@pacbell.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
--cc=stern@rowland.harvard.edu \
/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 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.