[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090305134806.GA1697@elf.ucw.cz>
Date: Thu, 5 Mar 2009 14:48:06 +0100
From: Pavel Machek <pavel@....cz>
To: Alan Stern <stern@...land.harvard.edu>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>,
Arve Hj?nnev?g <arve@...roid.com>,
"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>,
Matthew Garrett <mjg59@...f.ucam.org>,
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 Wed 2009-02-18 18:31:15, Alan Stern wrote:
> On Thu, 19 Feb 2009, Rafael J. Wysocki wrote:
>
> > > If some devices are autosuspended after a local inactivity timeout, I
> > > don't want to wait for those devices to autosuspend if I know the code
> > > that needed to run is done. This could cause delays in the normal
> > > case,
> >
> > Isn't it a matter of adjusting the inactivity timeouts in a suitable way?
>
> It's not that simple. A single device driver has a very local view,
> not suitable for deciding whether the entire system should go to sleep.
>
> So for example, a disk driver might think it's appropriate to spin down
> the disk after 10 seconds of inactivity. But an overall system monitor
> might realize that nothing is going on right now and want to put the
> system to sleep immediately, without waiting the 10 seconds for the
> disk to autosuspend.
Hmm, I'm not sure. If system is so busy that it keeps the disk up, it
may not be good idea to sleep whole system.
Example: "idle fileserver". Current command is done, so we seem to be
idle; but when we sleep, new command comes. While system really is
idle, it is bad idea to suspend.
If the overall system monitor can decide disk will not be used, it can
just sleep the disk.
> > > and it could prevent suspend if a background process (not using
> > > wakelocks) is accessing a disk more frequently than its idle timeout.
> >
> > Well, actually, shouldn't it prevent suspend from happening? Arguably, it just
> > means that the disk is continuously being accessed with respect to the inactive
> > timeout granularity.
>
> That's true, but it shows the problem of making the autosleep decision
> based on disk activity. An auto-sleep should not have to wait for
> every device (or some suitable subset) to become idle for some minimum
> time; it should be able to kick in at short notice.
I believe we do want to wake for timeouts, as not all sources of
wakeup are local.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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