From: Florian Mickler <florian@mickler.org>
To: Florian Mickler <florian@mickler.org>
Cc: linux-kernel@vger.kernel.org, markgross@thegnar.org,
640e9920@gmail.com, "Thomas Gleixner" <tglx@linutronix.de>,
"Alan Cox" <alan@lxorguk.ukuu.org.uk>,
"Brian Swetland" <swetland@google.com>,
"Arve Hjønnevåg" <arve@android.com>,
linux-pm@lists.linux-foundation.org,
"Rafael J. Wysocki" <rjw@sisk.pl>,
mark.gross@intel.com
Subject: Re: [RFC] lp_events: an lternitive to suspend blocker user mode and kernel API
Date: Mon, 31 May 2010 10:05:45 +0200 [thread overview]
Message-ID: <20100531100545.658a35b7@schatten.dmk.lab> (raw)
In-Reply-To: <20100531084356.272f3e1a@schatten.dmk.lab>
On Mon, 31 May 2010 08:43:56 +0200
Florian Mickler <florian@mickler.org> wrote:
> On Mon, 31 May 2010 09:57:53 +1000
> Neil Brown <neilb@suse.de> wrote:
>
> > 2/ Rather than tracking wake-events from the hardware up through possibly
> > several kernel modules, you go directly from hardware to user-space so each
> > event is potentially presented to user-space twice: once as a "wake up
> > from low power state" event and once following the normal path (maybe a
> > key-press event, maybe a serial-port event, maybe a network receive event).
> > I can see that this is a very tempting approach. It allows all those
> > intermediate modules to remain unchanged and that is good.
> > However it isn't clear to me that this would be easy for user-space to use
> > correctly.
> > When an lpe event arrived it would need to wait around for the real event
> > to arrive and then process that. I probably wouldn't wait long, but it
> > would be an indeterminate wait, and it might not be trivial to determine
> > if all events that would cause a wake-up have been consumed as a direct
> > mapping from lpe event to normal event may not always be possible.
> > Maybe this is more of a theoretical problem and in practice it would be
> > easy to get it right - I don't have enough concrete experience to be sure.
> >
> > So: I like the idea of leaving the intermediate layers unchanged, but I'm
> > not convinced it would work.
>
> To add to this: Is it a correct assumption
> that all wake-up events that leave a driver trickle eventually up to
> userspace?
>
> I think splitting the actual driver product (i.e. keypress or whatever)
> of a wake-up-event and it's corresponding wake-lock is not possible.
> Because you would have to _somehow_ map the block back to the product
> when you consume the product.
>
> If you want to abstract the blocking from the kernel-code you probably
> have to introduce an abstract "driver-product" entity where you can do
> all your blocking associated with the product but hidden from the code
> that uses the product. (Which I don't think is feasible, because it
> increases overhead)
>
> Or am I on the wrong track here?
I just realized, that you can cancel lpe_blocks via delete_lpe_block(),
so this is not an issue at all.
They can be used just like suspend blockers.
Also the mapping of lpe_block to "wake event" is the same problem as
with the suspend_blockers...
So I don't think this is a bad idea after all. It decouples the
suspend_blockers from "suspend" quite nicely.
Although it still is only "block" or "no block" and not, as was
suggested some sort of more fine grained requirement definition.
Cheers,
Flo
next prev parent reply other threads:[~2010-05-31 8:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-30 20:04 [RFC] lp_events: an lternitive to suspend blocker user mode and kernel API mark gross
2010-05-30 23:57 ` Neil Brown
2010-05-31 6:43 ` Florian Mickler
2010-05-31 8:05 ` Florian Mickler [this message]
2010-05-31 22:43 ` mark gross
2010-05-31 22:26 ` mark gross
2010-05-31 22:10 ` mark gross
2010-05-31 22:45 ` Rafael J. Wysocki
2010-06-01 5:09 ` [linux-pm] " mark gross
2010-06-01 5:24 ` Arve Hjønnevåg
2010-06-01 14:01 ` mark gross
2010-06-02 3:10 ` Arve Hjønnevåg
2010-06-02 3:24 ` Gross, Mark
2010-06-02 4:26 ` Arve Hjønnevåg
2010-05-31 9:55 ` Arve Hjønnevåg
2010-05-31 23:03 ` mark gross
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=20100531100545.658a35b7@schatten.dmk.lab \
--to=florian@mickler.org \
--cc=640e9920@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arve@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mark.gross@intel.com \
--cc=markgross@thegnar.org \
--cc=rjw@sisk.pl \
--cc=swetland@google.com \
--cc=tglx@linutronix.de \
/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