Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753001Ab0DXOhD (ORCPT ); Sat, 24 Apr 2010 10:37:03 -0400 Received: from netrider.rowland.org ([192.131.102.5]:54440 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752276Ab0DXOg7 (ORCPT ); Sat, 24 Apr 2010 10:36:59 -0400 Date: Sat, 24 Apr 2010 10:36:58 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: =?ISO-8859-1?Q?Arve_Hj=F8nnev=E5g?= cc: Dmitry Torokhov , Randy Dunlap , =?ISO-8859-1?Q?M=E1rton_N=E9meth?= , Thadeu Lima de Souza Cascardo , , Sven Neumann , , Henrik Rydberg , Jiri Kosina , , Tero Saarni , Matthew Garrett Subject: Re: [linux-pm] [PATCH 8/9] Input: Block suspend while event queue is not empty. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1346 Lines: 32 On Fri, 23 Apr 2010, Arve Hj?nnev?g wrote: > On Fri, Apr 23, 2010 at 2:08 PM, Dmitry Torokhov > wrote: > > On Friday 23 April 2010 01:56:25 pm Randy Dunlap wrote: > >> On Thu, 22 Apr 2010 18:08:57 -0700 Arve Hj?nnev?g wrote: > >> > Add an ioctl, EVIOCSSUSPENDBLOCK, to enable a suspend_blocker that will > >> > block suspend while the event queue is not empty. This allows userspace > >> > code to process input events while the device appears to be asleep. > >> > >> All new ioctls need to be added to Documentation/ioctl/ioctl-number.txt, > >> please. > > > > I do not see the reason for it to be in the kernel still. Have a process > > that listens to all input devices (or subset of them), once events stop > > coming initiate suspend. > > > > I think the document added by the first patch explains this. The > solution you propose above will ignore a wakeup key pressed right > after user space decides to initiate suspend. Is there some reason why this feature needs to be enabled by an ioctl? Why not make this suspend blocker permanently enabled? Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/