From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752830AbaIIVxw (ORCPT ); Tue, 9 Sep 2014 17:53:52 -0400 Received: from mail-qc0-f177.google.com ([209.85.216.177]:38898 "EHLO mail-qc0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbaIIVxu (ORCPT ); Tue, 9 Sep 2014 17:53:50 -0400 MIME-Version: 1.0 In-Reply-To: <20ADAB092842284E95860F279283C5642ED08D93@BGSMSX104.gar.corp.intel.com> References: <1375475882-3660-1-git-send-email-zoran.markovic@linaro.org> <20ADAB092842284E95860F279283C5642ED08D93@BGSMSX104.gar.corp.intel.com> Date: Tue, 9 Sep 2014 14:53:49 -0700 Message-ID: Subject: Re: [RFC PATCH] pm: prevent suspend until power supply events are processed From: Todd Poynor To: "Tc, Jenny" Cc: Viresh Kumar , Zoran Markovic , Anton Vorontsov , "linux-kernel@vger.kernel.org" , David Woodhouse , Arve Hjonnevag , John Stultz , Ruchi Kandoi Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 4, 2014 at 9:37 AM, Tc, Jenny wrote: > If the intention is to prevent suspend while processing the power supply uevents, > Isn't it a good option to use EPOLLWAKEUP? In Android, it's already used by > healthd to achieve the same. It's a good idea for the userspace handler of the power_supply uevents to use EPOLLWAKEUP. This patch will help ensure the system remains awake until uevent dispatching grabs its wakelock, and then the userspace receiver can take over preventing suspend via EPOLLWAKEUP. Todd