From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Stern Subject: Re: [PATCH 01/13] PM: Add wake lock api. Date: Sun, 8 Mar 2009 08:34:09 -0400 (EDT) Message-ID: References: <20090308083243.GD1371@ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090308083243.GD1371@ucw.cz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Pavel Machek Cc: "swetland@google.com" , linux-pm@lists.linux-foundation.org, Uli Luckas , "ncunningham@crca.org.au" List-Id: linux-pm@vger.kernel.org On Sun, 8 Mar 2009, Pavel Machek wrote: > > I don't know the details of sleepy linux so I'd appreciate if someone can > > eluminate if the following scenarios could be handled efficiently with sleepy > > linux: > > 1) You wake up through RTC, read the battery, update the color of your > > fancy 'battery good' LED and go back to sleep imediately. The real work > > takes milliseconds. > > This should work. > > > 2) You send a request to the internet and go idle by selecting for an answer. > > You probably don't want to go to sleep as you know, the answer will be > > there shortly. > > Way to get this to work would be to keep the system woke up 300msec or > so after each network packet -- assuming that if one came another is > probably coming soon. That sounds like a perfect use for a suspend_blocker with a timeout! Alan Stern