From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Arve Hjønnevåg" <arve@android.com>
Cc: linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org,
Brian Swetland <swetland@google.com>
Subject: Re: [PATCH 0/8] Suspend block api (version 7)
Date: Mon, 17 May 2010 22:40:35 +0200 [thread overview]
Message-ID: <201005172240.35742.rjw@sisk.pl> (raw)
In-Reply-To: <AANLkTinP68yHYfVCW-urCrRbeSb0Mlz8JsvAs-FKoUPZ@mail.gmail.com>
On Monday 17 May 2010, Arve Hjønnevåg wrote:
> 2010/5/16 Rafael J. Wysocki <rjw@sisk.pl>:
> > On Friday 14 May 2010, Arve Hjønnevåg wrote:
> >> This patch series adds a suspend-block api that provides the same
> >> functionality as the android wakelock api. This version has some
> >> changes from, or requested by, Rafael. The most notable changes are:
> >> - DEFINE_SUSPEND_BLOCKER and suspend_blocker_register have been added
> >> for statically allocated suspend blockers.
> >> - suspend_blocker_destroy is now called suspend_blocker_unregister
> >> - The user space mandatory _INIT ioctl has been replaced with an
> >> optional _SET_NAME ioctl.
> >>
> >> I kept the ack and reviewed by tags on two of the patches even though
> >> there were a few cosmetic changes.
> >
> > I have one more comment, sorry for that.
> >
> > Namely, if /sys/power/policy is set to "opportunistic" and "mem" is written
> > into /sys/power/state and there are no suspend blockers present except for
> > the main blocker (and the blockers used only for statistics), the system won't
> > be able to go out of an infinit suspend-resume loop (or at least it seems
> > so from reading the code).
> >
> > I think we should prevent that from happening somehow.
> >
>
> It should get out of that loop as soon as someone blocks suspend. If
> someone is constantly aborting suspend without using a suspend blocker
> it will be very inefficient, but it should still work.
Well, the scenario I have in mind is the following. Someone wants to check
the feature and simply writes "opportunistic" to /sys/power/policy and "mem" to
/sys/power/state without any drivers or apps that use suspend blockers.
How in that case is the system supposed to break out of the suspend-resume loop
resulting from this? I don't see right now, because the main blocker is
inactive, there are no other blockers that can be activated and it is next to
impossible to write to /sys/power/state again.
Rafael
next prev parent reply other threads:[~2010-05-17 20:39 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-14 4:11 [PATCH 0/8] Suspend block api (version 7) Arve Hjønnevåg
2010-05-14 4:11 ` [PATCH 1/8] PM: Add suspend block api Arve Hjønnevåg
2010-05-14 4:11 ` Arve Hjønnevåg
2010-05-14 4:11 ` [PATCH 2/8] PM: suspend_block: Add driver to access suspend blockers from user-space Arve Hjønnevåg
2010-05-14 4:11 ` Arve Hjønnevåg
2010-05-14 4:11 ` [PATCH 3/8] PM: suspend_block: Abort task freezing if a suspend_blocker is active Arve Hjønnevåg
2010-05-14 4:11 ` Arve Hjønnevåg
2010-05-14 4:11 ` [PATCH 4/8] PM: suspend_block: Add debugfs file Arve Hjønnevåg
2010-05-14 4:11 ` Arve Hjønnevåg
2010-05-14 4:11 ` [PATCH 5/8] PM: suspend_block: Add suspend_blocker stats Arve Hjønnevåg
2010-05-14 4:11 ` Arve Hjønnevåg
2010-05-14 4:11 ` [PATCH 6/8] PM: Add suspend blocking work Arve Hjønnevåg
2010-05-14 4:11 ` Arve Hjønnevåg
2010-05-14 4:11 ` [PATCH 7/8] Input: Block suspend while event queue is not empty Arve Hjønnevåg
2010-05-14 4:11 ` Arve Hjønnevåg
2010-05-14 4:11 ` [PATCH 8/8] power_supply: Block suspend while power supply change notifications are pending Arve Hjønnevåg
2010-05-14 4:11 ` Arve Hjønnevåg
2010-05-14 6:13 ` [PATCH 1/8] PM: Add suspend block api Paul Walmsley
2010-05-14 6:27 ` Paul Walmsley
2010-05-14 7:14 ` Arve Hjønnevåg
2010-05-18 2:17 ` Paul Walmsley
2010-05-18 3:06 ` Arve Hjønnevåg
2010-05-18 3:34 ` Paul Walmsley
2010-05-18 3:51 ` Arve Hjønnevåg
2010-05-19 15:55 ` Paul Walmsley
2010-05-20 0:35 ` Arve Hjønnevåg
2010-05-18 13:11 ` Pavel Machek
2010-05-20 9:11 ` Florian Mickler
2010-05-20 9:11 ` Florian Mickler
2010-05-20 9:26 ` Florian Mickler
2010-05-20 22:18 ` Rafael J. Wysocki
2010-05-20 22:18 ` Rafael J. Wysocki
2010-05-21 6:04 ` Florian Mickler
2010-05-21 6:04 ` Florian Mickler
2010-05-27 15:41 ` Pavel Machek
2010-05-27 15:41 ` Pavel Machek
2010-05-20 9:26 ` Florian Mickler
2010-05-18 13:11 ` Pavel Machek
2010-05-14 21:08 ` [PATCH 0/8] Suspend block api (version 7) Rafael J. Wysocki
2010-05-14 21:08 ` Rafael J. Wysocki
2010-05-17 4:50 ` Arve Hjønnevåg
2010-05-17 19:01 ` Mike Snitzer
2010-05-17 19:01 ` Mike Snitzer
2010-05-17 21:42 ` Rafael J. Wysocki
2010-05-17 21:42 ` Rafael J. Wysocki
2010-05-17 22:16 ` Kevin Hilman
2010-05-17 22:16 ` Kevin Hilman
2010-05-18 0:52 ` Arve Hjønnevåg
2010-05-18 0:52 ` Arve Hjønnevåg
2010-05-18 16:18 ` Kevin Hilman
2010-05-18 18:52 ` Rafael J. Wysocki
2010-05-18 22:04 ` Kevin Hilman
2010-05-18 22:29 ` Rafael J. Wysocki
2010-05-18 22:29 ` Rafael J. Wysocki
2010-05-18 22:04 ` Kevin Hilman
2010-05-18 18:52 ` Rafael J. Wysocki
2010-05-19 0:00 ` Arve Hjønnevåg
2010-05-19 0:00 ` Arve Hjønnevåg
2010-05-18 16:18 ` Kevin Hilman
2010-05-18 16:18 ` Kevin Hilman
2010-05-18 19:13 ` Rafael J. Wysocki
2010-05-18 20:47 ` Arve Hjønnevåg
2010-05-18 20:47 ` Arve Hjønnevåg
2010-05-18 21:48 ` Rafael J. Wysocki
2010-05-18 21:48 ` Rafael J. Wysocki
2010-05-18 22:03 ` Arve Hjønnevåg
2010-05-18 22:34 ` Rafael J. Wysocki
2010-05-18 22:34 ` Rafael J. Wysocki
2010-05-18 22:52 ` Arve Hjønnevåg
2010-05-18 22:52 ` Arve Hjønnevåg
2010-05-18 23:19 ` Rafael J. Wysocki
2010-05-18 23:42 ` Arve Hjønnevåg
2010-05-19 20:39 ` Rafael J. Wysocki
2010-05-19 20:39 ` Rafael J. Wysocki
2010-05-19 21:34 ` Arve Hjønnevåg
2010-05-19 21:34 ` Arve Hjønnevåg
2010-05-20 22:21 ` Rafael J. Wysocki
2010-05-20 22:21 ` Rafael J. Wysocki
2010-05-18 23:42 ` Arve Hjønnevåg
2010-05-18 23:19 ` Rafael J. Wysocki
2010-05-18 22:03 ` Arve Hjønnevåg
2010-05-18 19:13 ` Rafael J. Wysocki
2010-05-17 4:50 ` Arve Hjønnevåg
2010-05-16 19:42 ` Rafael J. Wysocki
2010-05-17 4:16 ` Arve Hjønnevåg
2010-05-17 4:16 ` Arve Hjønnevåg
2010-05-17 20:40 ` Rafael J. Wysocki [this message]
2010-05-17 20:51 ` Brian Swetland
2010-05-17 21:44 ` Rafael J. Wysocki
2010-05-17 23:32 ` Arve Hjønnevåg
2010-05-17 23:32 ` Arve Hjønnevåg
2010-05-18 19:38 ` Rafael J. Wysocki
2010-05-18 19:38 ` Rafael J. Wysocki
2010-05-18 20:35 ` Arve Hjønnevåg
2010-05-18 20:35 ` Arve Hjønnevåg
2010-05-18 21:14 ` Rafael J. Wysocki
2010-05-18 22:21 ` Arve Hjønnevåg
2010-05-18 22:56 ` Rafael J. Wysocki
2010-05-18 22:56 ` Rafael J. Wysocki
2010-05-18 23:06 ` Arve Hjønnevåg
2010-05-19 20:40 ` Rafael J. Wysocki
2010-05-19 20:40 ` Rafael J. Wysocki
2010-05-18 23:06 ` Arve Hjønnevåg
2010-05-18 22:21 ` Arve Hjønnevåg
2010-05-18 21:14 ` Rafael J. Wysocki
2010-05-17 21:44 ` Rafael J. Wysocki
2010-05-17 20:51 ` Brian Swetland
2010-05-17 20:40 ` Rafael J. Wysocki
2010-05-16 19:42 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2010-05-14 4:11 Arve Hjønnevåg
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=201005172240.35742.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=arve@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=swetland@google.com \
/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.