From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752981Ab2GPKyj (ORCPT ); Mon, 16 Jul 2012 06:54:39 -0400 Received: from ogre.sisk.pl ([193.178.161.156]:42202 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965Ab2GPKyh convert rfc822-to-8bit (ORCPT ); Mon, 16 Jul 2012 06:54:37 -0400 From: "Rafael J. Wysocki" To: Michael Kerrisk , Arve =?iso-8859-1?q?Hj=F8nnev=E5g?= Subject: Re: [PATCH] epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready Date: Mon, 16 Jul 2012 13:00:15 +0200 User-Agent: KMail/1.13.6 (Linux/3.5.0-rc5+; KDE/4.6.0; x86_64; ; ) Cc: NeilBrown , Linux PM list , LKML , Magnus Damm , markgross@thegnar.org, Matthew Garrett , Greg KH , John Stultz , Brian Swetland , Alan Stern , Dmitry Torokhov , "Srivatsa S. Bhat" , mtk@lwn.net References: <1335850428-30883-1-git-send-email-arve@android.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Message-Id: <201207161300.16282.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, July 16, 2012, Michael Kerrisk wrote: > Arve, Rafael, > > On Tue, May 1, 2012 at 7:33 AM, 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. > > It's late it the -rc series, Well, exactly. :-) > but it strikes me that CAP_EPOLLWAKEUP is > a poor name for the capability that governs the use of EPOLLWAKEUP. > While on the one hand some capabilities are overloaded > (https://lwn.net/Articles/486306/), on the other hand we should avoid > adding individual capabilities for each new API feature (otherwise > capabilities become administratively unwieldy). > > This capability is not really about "EPOLL". It's about the ability to > block system suspend. Therefore, IMO, a better name would be something > like: CAP_BLOCK_SUSPEND. This name is better because there might be > some other API feature that is later added that also has the effect of > preventing system suspends, and we could reasonably govern that > feature with the same capability. > > Does that seem sensible to you? I can send a patch for the name change. I'm not sure what Arve thinks about that, but I'd be fine with that. Arve, what do you think? Rafael