From: mark gross <markgross@thegnar.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: mark gross <markgross@thegnar.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>, NeilBrown <neilb@suse.de>,
linux-kernel@vger.kernel.org,
John Stultz <john.stultz@linaro.org>,
arve@android.com, amit.kucheria@linaro.org, farrowg@sg.ibm.com,
"Dmitry Fink (Palm GBU)" <Dmitry.Fink@palm.com>,
linux-pm@lists.linux-foundation.org, khilman@ti.com,
Magnus Damm <damm@opensource.se>,
mjg@redhat.com, peterz@infradead.org
Subject: Re: [markgross@thengar.org: [RFC] wake up notifications and suspend blocking (aka more wakelock stuff)]
Date: Fri, 14 Oct 2011 06:23:32 -0700 [thread overview]
Message-ID: <20111014132332.GB27295@mgross-G62> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1110131101420.2026-100000@iolanthe.rowland.org>
On Thu, Oct 13, 2011 at 11:06:35AM -0400, Alan Stern wrote:
> On Wed, 12 Oct 2011, mark gross wrote:
>
> > > > > sometimes devices that are not wake up sources need critical sections
> > > > > where suspend is a problem.
> > >
> > > Mark, can you give some examples? This isn't the same as the firmware
> > > update thing, is it? That deserves to be handled by a completely
> > > separate mechanism.
> >
> > The biggest example I know of is any usb gadget implementation while
> > connected to a USB host. If the device is connected to the USB bus then
> > it needs to not suspend because it cannot respond to the USB commands
> > for bus power. i.e. if its connected to a laptop and the suspend the
> > laptop the gadget needs to handle the USB protocol packets.
> >
> > Also, when charging battery under OS control we don't want to suspend
> > because it will be hard to respond to thermal events or changing
> > battery conditions if the system is in suspend.
>
> This is like the firmware update problem -- it has nothing to do with
> wakeups. It could be handled very easily either by abusing a wakeup
> source as Neil suggested or by adding a different mechanism for
> preventing system sleeps.
yes. This is just another mechanism to prevent sleeps.
> > > Although many of these problems could be solved by adopting a suitable
> > > protocol in userspace, currently there is no such protocol. Even if
> > > one did exist, the process of getting all the relevant programs to
> > > adopt it would take quite a while. This is a case where a problem can
> > > be solved either in the kernel or in userspace, and the in-kernel
> > > solution may be simpler.
> >
> > I do think a better solution would involve some kernel coordination.
> >
> > I don't want to split hairs on if its 100% possible to implement a
> > correct solution only in user mode. but, I think there are corner cases
> > that may be hard or impossible to get right with only user mode. See
> > gadget issue above. Not all gadgets have a user mode daemon backing up
> > the kernel part do they?
>
> I don't know. But if they don't have some sort of userspace component
> for power management then they never go into suspend, because the
> kernel doesn't initiate suspends by itself.
yes, but the kernel can / does block user initiated suspends from
various user mode initiators. All this is for is to block suspend entry
until the driver is ok with it. this patch is nothing more than that
really.
--mark
next prev parent reply other threads:[~2011-10-14 13:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-02 16:44 mark gross
2011-10-08 11:14 ` NeilBrown
2011-10-08 18:16 ` mark gross
2011-10-08 18:57 ` Rafael J. Wysocki
2011-10-08 20:07 ` Alan Stern
2011-10-13 3:07 ` mark gross
2011-10-13 15:06 ` Alan Stern
2011-10-14 13:23 ` mark gross [this message]
2011-10-13 2:59 ` mark gross
2011-10-08 22:31 ` NeilBrown
2011-10-13 3:48 ` mark gross
2011-10-13 5:35 ` NeilBrown
2011-10-13 15:16 ` Alan Stern
2011-10-14 21:47 ` NeilBrown
2011-10-15 18:45 ` Alan Stern
2011-10-15 22:25 ` NeilBrown
2011-10-16 1:49 ` Alan Stern
2011-10-16 21:37 ` NeilBrown
2011-10-24 1:18 ` mark gross
2011-10-24 1:50 ` NeilBrown
2011-10-25 4:50 ` mark gross
2011-10-25 15:14 ` Alan Stern
2011-10-25 7:05 ` Brian Swetland
2011-10-14 14:01 ` mark gross
2011-10-15 14:05 ` mark gross
2011-10-15 22:12 ` NeilBrown
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=20111014132332.GB27295@mgross-G62 \
--to=markgross@thegnar.org \
--cc=Dmitry.Fink@palm.com \
--cc=amit.kucheria@linaro.org \
--cc=arve@android.com \
--cc=damm@opensource.se \
--cc=farrowg@sg.ibm.com \
--cc=john.stultz@linaro.org \
--cc=khilman@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mjg@redhat.com \
--cc=neilb@suse.de \
--cc=peterz@infradead.org \
--cc=rjw@sisk.pl \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®