[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200902272355.12240.rjw@sisk.pl>
Date: Fri, 27 Feb 2009 23:55:10 +0100
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: Arve Hjønnevåg <arve@...roid.com>
Cc: Matthew Garrett <mjg59@...f.ucam.org>, Pavel Machek <pavel@....cz>,
Alan Stern <stern@...land.harvard.edu>,
"Woodruff, Richard" <r-woodruff2@...com>,
Arjan van de Ven <arjan@...radead.org>,
Kyle Moffett <kyle@...fetthome.net>,
Oliver Neukum <oliver@...kum.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
pm list <linux-pm@...ts.linux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Nigel Cunningham <nigel@...el.suspend2.net>,
mark gross <mgross@...ux.intel.com>,
Uli Luckas <u.luckas@...d.de>,
Igor Stoppa <igor.stoppa@...ia.com>,
Brian Swetland <swetland@...gle.com>,
Len Brown <lenb@...nel.org>
Subject: Re: [RFD] Automatic suspend
On Friday 27 February 2009, Arve Hjønnevåg wrote:
> On Fri, Feb 27, 2009 at 12:54 PM, Rafael J. Wysocki <rjw@...k.pl> wrote:
> > On Friday 27 February 2009, Matthew Garrett wrote:
> >> On Fri, Feb 27, 2009 at 03:22:39PM +0100, Rafael J. Wysocki wrote:
> >> > On Friday 27 February 2009, Pavel Machek wrote:
> >> > > Wakelocks done right are single atomic_t... and if you set it to 0,
> >> > > you just unblock "sleeper" thread or something. Zero polling and very
> >> > > simple...
> >> >
> >> > Except that you have to check all of the wakelocks periodically in a loop =>
> >> > polling. So?
> >>
> >> Why do you need to check them? If you're taking this approach you just
> >> have something like:
> >>
> >> suspend_unblock() {
> >> if (atomc_dec_and_test(&suspend_lock))
> >> suspend();
> >> }
> >>
> >> and then check that the lock count is still 0 after device_suspend().
> >> There's no need to poll.
> >
> > I was talking about wakelocks as originally proposed.
>
> Can you be more specific? My wakelock implementation triggers suspend
> when the active list becomes empty. No polling required.
Sorry, I overlooked and/or didn't remember that. My bad.
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists