public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: markgross@thegnar.org, Alan Stern <stern@rowland.harvard.edu>
Cc: Neil Brown <neilb@suse.de>,
	linux-pm@lists.linux-foundation.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	mark gross <640e9920@gmail.com>
Subject: Re: [RFC][PATCH] PM: Avoid losing wakeup events during suspend
Date: Sun, 20 Jun 2010 21:04:22 -0700 (PDT)	[thread overview]
Message-ID: <799617.66764.qm@web180304.mail.gq1.yahoo.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1006202223440.29532-100000@netrider.rowland.org>


> > > Indeed, the same problem arises if the event
> isn't delivered to
> > > userspace until after userspace is frozen.

Can we put this more directly:  the problem is
that the *SYSTEM ISN'T FULLY SUSPENDED* when the
hardware wake event triggers?  (Where "*SYSTEM*
includes userspace not just kernel.  In fact the
overall system is built from many subsystems,
some in the kernel and some in userspace.

At the risk of being prematurely general:  I'd
point out that these subsystems probably have
sequencing requirements.  kernel-then-user is
a degenerate case, and surely oversimplified.
There are other examples, e.g. between kernel
subsystems...  Like needing to suspend a PMIC
before the bus it uses, where that bus uses
a task to manage request/response protocols.
(Think I2C or SPI.)

This is like the __init/__exit sequencing mess...

In terms of userspace event delivery, I'd say
it's a bug in the event mechanism if taking the
next step in suspension drops any event.  It
should be queued, not lost...  As a rule the
hardware queuing works (transparently)...

> Of course, the underlying
> > > issue here is that the kernel has no direct way
> to know when userspace
> > > has finished processing an event.


Again said more directly:  there's no current
mechanism to coordinate subsystems.  Userspace
can't communicate "I'm ready" to kernel, and
vice versa.  (a few decades ago, APM could do
that ... we dropped such mechanisms though, and
I'm fairly sure APM's implementation was holey.)

  parent reply	other threads:[~2010-06-21  4:04 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100620225810.GB9735@gvim.org>
2010-06-21  2:33 ` [RFC][PATCH] PM: Avoid losing wakeup events during suspend Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1006202223440.29532-100000@netrider.rowland.org>
2010-06-21  4:04   ` David Brownell [this message]
2010-06-21  6:02     ` David Brownell
2010-06-21 15:06     ` Alan Stern
2010-06-21  5:55   ` mark gross
     [not found]   ` <20100621055522.GE9735@gvim.org>
2010-06-21 12:39     ` Florian Mickler
2010-06-21 15:57     ` Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.1006211125470.1687-100000@iolanthe.rowland.org>
2010-06-22  1:58       ` mark gross
     [not found]       ` <20100622015837.GC12795@gvim.org>
2010-06-22  2:46         ` Alan Stern
2010-06-22  6:18         ` Florian Mickler
2010-06-22  9:29         ` Rafael J. Wysocki
     [not found]         ` <20100622081803.4d472542@schatten.dmk.lab>
2010-06-22 23:22           ` mark gross
     [not found] <Pine.LNX.4.44L0.1006221508390.1322-100000@iolanthe.rowland.org>
2010-06-22 20:58 ` Rafael J. Wysocki
     [not found] <201006221735.10467.rjw@sisk.pl>
2010-06-22 19:55 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.1006220952290.1631-100000@iolanthe.rowland.org>
2010-06-22 15:35 ` Rafael J. Wysocki
     [not found] <Pine.LNX.4.44L0.1006212224550.19813-100000@netrider.rowland.org>
2010-06-22  9:24 ` Rafael J. Wysocki
     [not found] <20100622012519.GB12795@gvim.org>
2010-06-22  2:24 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.1006211814370.1687-100000@iolanthe.rowland.org>
2010-06-21 22:40 ` Rafael J. Wysocki
     [not found] ` <201006220040.41524.rjw@sisk.pl>
2010-06-21 22:48   ` Rafael J. Wysocki
2010-06-22  0:50   ` Arve Hjønnevåg
2010-06-22 10:21   ` Rafael J. Wysocki
     [not found]   ` <201006221221.53801.rjw@sisk.pl>
2010-06-22 14:35     ` Alan Stern
2010-06-22 23:00     ` mark gross
     [not found] <201006212318.03001.rjw@sisk.pl>
2010-06-21 22:27 ` Alan Stern
     [not found] <20100621223841.1cf1942d@schatten.dmk.lab>
2010-06-21 22:18 ` Alan Stern
     [not found] <20100621073233.3f874ad0@schatten.dmk.lab>
2010-06-21 15:23 ` Alan Stern
2010-06-21 16:54 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1006211111060.1687-100000@iolanthe.rowland.org>
2010-06-21 20:38   ` Florian Mickler
     [not found] ` <Pine.LNX.4.44L0.1006211244140.1687-100000@iolanthe.rowland.org>
2010-06-21 20:40   ` Florian Mickler
2010-06-21 21:18   ` Rafael J. Wysocki
     [not found] <201006202350.27143.rjw@sisk.pl>
2010-06-21  2:23 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1006202154260.29532-100000@netrider.rowland.org>
2010-06-21  5:32   ` Florian Mickler
2010-06-21  6:13   ` mark gross
     [not found]   ` <20100621061345.GF9735@gvim.org>
2010-06-21 12:10     ` tytso
     [not found]     ` <20100621121058.GF6199@thunk.org>
2010-06-21 12:22       ` Alan Cox
2010-06-21 12:26         ` Florian Mickler
2010-06-21 12:26         ` Florian Mickler
2010-06-21 13:42         ` tytso
     [not found]         ` <20100621134249.GG6199@thunk.org>
2010-06-21 14:01           ` Alan Cox
2010-06-22  1:07       ` mark gross
2010-06-21 16:01     ` Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.1006211158200.1687-100000@iolanthe.rowland.org>
2010-06-22  1:25       ` mark gross
2010-06-21 21:58   ` Rafael J. Wysocki
     [not found] <201006200005.35771.rjw@sisk.pl>
2010-06-20  5:52 ` mark gross
     [not found] ` <20100620055254.GA21994@gvim.org>
2010-06-20 12:49   ` Rafael J. Wysocki
     [not found]   ` <201006201449.14754.rjw@sisk.pl>
2010-06-20 23:13     ` mark gross
2010-06-20 16:28 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1006201153420.22272-100000@netrider.rowland.org>
2010-06-20 21:50   ` Rafael J. Wysocki
2010-06-20 22:58   ` mark gross
2010-06-19 22:05 Rafael J. Wysocki

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=799617.66764.qm@web180304.mail.gq1.yahoo.com \
    --to=david-b@pacbell.net \
    --cc=640e9920@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=markgross@thegnar.org \
    --cc=neilb@suse.de \
    --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