Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758154Ab2EANrE (ORCPT ); Tue, 1 May 2012 09:47:04 -0400 Received: from ogre.sisk.pl ([193.178.161.156]:47481 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757665Ab2EANqs convert rfc822-to-8bit (ORCPT ); Tue, 1 May 2012 09:46:48 -0400 From: "Rafael J. Wysocki" To: NeilBrown Subject: Re: [PATCH] epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready Date: Tue, 1 May 2012 15:51:33 +0200 User-Agent: KMail/1.13.6 (Linux/3.4.0-rc5+; KDE/4.6.0; x86_64; ; ) Cc: Arve =?utf-8?q?Hj=C3=B8nnev=C3=A5g?= , Linux PM list , LKML , Magnus Damm , markgross@thegnar.org, Matthew Garrett , Greg KH , John Stultz , Brian Swetland , Alan Stern , Dmitry Torokhov , "Srivatsa S. Bhat" References: <1335850428-30883-1-git-send-email-arve@android.com> <20120501162811.26261d1d@notabene.brown> In-Reply-To: <20120501162811.26261d1d@notabene.brown> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Message-Id: <201205011551.33699.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1533 Lines: 39 On Tuesday, May 01, 2012, NeilBrown wrote: > On Mon, 30 Apr 2012 22:33:48 -0700 Arve Hjønnevåg wrote: > > > When an epoll_event, that has the EPOLLWAKEUP flag set, is ready, a > > wakeup_source will be active to prevent suspend. This can be used to > > handle wakeup events from a driver that support poll, e.g. input, if > > that driver wakes up the waitqueue passed to epoll before allowing > > suspend. > > > > Signed-off-by: Arve Hjønnevåg > > Signed-off-by: Rafael J. Wysocki > > Thanks. > Reviewed-by: NeilBrown Thanks a lot for your involvement here! > However: > 1/ I think all references to "automatic system suspend" can be replaced with > "system suspend" as an active wakeup_source disables any suspend, no matter > it's source OK, I'll change that when applying the patch (although that only applies to suspends taking the wakeup events signaling through wakeup sources into account). > 2/ I reserve to right to submit for discussion a later patch which removes > the ep->ws in favour or some other exclusion mechanism :-) Well, you can alwyas do that. :-) Of course, when the patch goes to Linus, we'll have to be careful about changes visible to user space, though. Thanks, Rafael -- 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/