Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751797AbbD3RK2 (ORCPT ); Thu, 30 Apr 2015 13:10:28 -0400 Received: from mail-ie0-f182.google.com ([209.85.223.182]:35750 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbbD3RK1 (ORCPT ); Thu, 30 Apr 2015 13:10:27 -0400 MIME-Version: 1.0 In-Reply-To: <1430411117.3945.2.camel@hadess.net> References: <1413881397.30379.7.camel@hadess.net> <1430411117.3945.2.camel@hadess.net> Date: Thu, 30 Apr 2015 10:10:26 -0700 Message-ID: Subject: Re: A desktop environment[1] kernel wishlist From: John Stultz To: Bastien Nocera , Olof Johansson , "Rafael J. Wysocki" Cc: Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2453 Lines: 61 On Thu, Apr 30, 2015 at 9:25 AM, Bastien Nocera wrote: > On Tue, 2014-10-21 at 10:04 -0700, John Stultz wrote: >> On Tue, Oct 21, 2014 at 1:49 AM, Bastien Nocera >> wrote: >> > Hey, >> > >> > GNOME has had discussions with kernel developers in the past, and, >> > fortunately, in some cases we were able to make headway. >> > >> > There are however a number of items that we still don't have >> > solutions >> > for, items that kernel developers might not realise we'd like to >> > rely >> > on, or don't know that we'd make use of if merged. >> > >> > I've posted this list at: >> > https://wiki.gnome.org/BastienNocera/KernelWishlist >> > >> > Let me know on-list or off-list if you have any comments about >> > those, so >> > I can update the list. >> >> As for: 'Export of "wake reason" when the system wakes up (rtc alarm, >> lid open, etc.) and wakealarm (/sys/class/rtc/foo/wakealarm) >> documentation' >> >> Can you expand more on the rational for the need here? Is this for UI >> for power debugging, or something else? > > This is pretty much what I had in mind: > https://www.chromium.org/chromium-os/chromiumos-design-docs/lucid-sleep > > I guess I didn't make myself understood. My, admittedly quick skim, of that design document seems to suggest that lucid sleep would be a new kernel state. That would keep the kernel in charge of determining the state transitions (ie: SUSPEND-(alarm)->LUCID-(wakelock release)->SUSPEND-(alarm)->LUCID-(power-button)->AWAKE). Then it seems userspace would be able to query the current state. This avoids some of the races I was concerned with trying to detect which irq woke us from suspend from userspace. That said, the Power Manager section in that document sounds a little racy as it seems to rely on asking userspace if suspend is ok, rather then using userspace wakelocks, so I'm not sure how well baked this doc is. Olof: Can you comment on who's working on that design doc? Also the discussion around using freezing cgroups separately to distinguish between lucid and awake is interesting, but I wonder if we need to make wakeup_sources/wakelocks cgroup aware, or has that already been done? thanks -john -- 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/