Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp612080ybi; Tue, 16 Jul 2019 02:37:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqz31UCwnCYh1DhxlomeAT+7oht9vXd/ZEeBmJId38Abek8TJ9Cw2lbB8IYjOplPr8Dek26w X-Received: by 2002:a65:5687:: with SMTP id v7mr32916501pgs.263.1563269831121; Tue, 16 Jul 2019 02:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563269831; cv=none; d=google.com; s=arc-20160816; b=M9awfojv+YaP4N2eTGxebOT+zrDTm7WSU+qMYuD7Z5jOVpHCxXaw9zNyyaVCcF5cB4 3J3i4+DlKFQtk/K2OfRXSC+Jkacj0ItWw1s0PrEh0Pr/j3ReEL9eZFBq1ynBKF7Z6xoz dZqRD61emQ2+PWUqGP+FnuZg1A3S3ldFxOiutR3etk/prdgB8vx2cHmsIRI0/IWS4vL8 Dl7GIm1mdds9qZ/1AXL9FOZPPBA9Br5u5ly9JJ3FRAtJYcXNKV0reeKQEG5s+Sk6kGWE zpIPFUG+cmLV/HwoK4VaGs8FIvdsquvGAdzoj5/FlaIA07PWP/XBa8jq6GVuvZjM3SKC TmDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+FC2gEuUssDgT4OS9oZYvaF6YcJNLaJUbd2YY7jMw8g=; b=FpxVTL0MKdP7bbWK4WlO5JMT79sZIxgJEWaVZVv3AvgBk6euXXqT4Izy6DzxERehPZ ICz2x9EuYUdQvDqnGfT8owkeNWw6j9VMht4flcNRcMkQCjgPBt1bbubamdZ9+OF2pMKe UzgJVrelTSqUdf0n98h0Hz5VDRJPhEKRyDeEPDSeb9SRvIESeaUaWHXLGyzTDf6ZS1/d FDx05WCdlv09Ja7baYsZbgVPSz4Zpvv0XdfeLqNeIh8FnQV/79+K6kBePitT5AcDC8tz NClxqqQin9cY1aKn/TFwp1kJeAie3KweAJITqGn/ctezXJ1wwHsGeazDJ6i7Jap63XAI 3Z+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si8957297pgq.17.2019.07.16.02.36.54; Tue, 16 Jul 2019 02:37:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731601AbfGPJgX (ORCPT + 99 others); Tue, 16 Jul 2019 05:36:23 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:47017 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbfGPJgX (ORCPT ); Tue, 16 Jul 2019 05:36:23 -0400 Received: by mail-ot1-f66.google.com with SMTP id z23so20302602ote.13; Tue, 16 Jul 2019 02:36:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+FC2gEuUssDgT4OS9oZYvaF6YcJNLaJUbd2YY7jMw8g=; b=QmCFoo6VCz8IOkHgPSpcoqQWh+6+c5jLwenSihKGXh6DEUTZnFt0hcwjv8jOZwpdsQ Q72RlhXvSAaWtFv+gGjRiInPP5SRQDTIC2jGAxO9Vpovp+IAoSTjrK68x7KruDRgFDmU Gzcoyin4uJ7sDyh6YMHQDwjTbWvQg+1rNghbfZhAIbmW6iCS9P7wJ1cZQJeKrFytGPQ5 IDfm3NhlRpYOQU69brga67tl4mqPpHEIea6Goa4nPB4kLxz9CYMfG6zXggNS4pQgqHQ+ A/yrDBZTaNxVkCFTpcNqd7WeXlYg4DFZfH6SydWW+0Oy9yNedH8FebtGK5I5BU/qqWCC FsIQ== X-Gm-Message-State: APjAAAV403nWomNA1v/kRJhLsgYh68YEc7xOEpesv22Q1TibDoNw/yT6 X5qbTvDMYMLYalPj7+i5o6g0POhUALB5/GmMVvc= X-Received: by 2002:a05:6830:8a:: with SMTP id a10mr18293432oto.167.1563269781832; Tue, 16 Jul 2019 02:36:21 -0700 (PDT) MIME-Version: 1.0 References: <20190715203651.GA7513@kroah.com> <20190715214348.81865-1-trong@android.com> <20190716021102.GA8310@kroah.com> <20190716083926.GA2505@kroah.com> In-Reply-To: <20190716083926.GA2505@kroah.com> From: "Rafael J. Wysocki" Date: Tue, 16 Jul 2019 11:36:10 +0200 Message-ID: Subject: Re: [PATCH v4] PM / wakeup: show wakeup sources stats in sysfs To: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" , Tri Vo , "Rafael J. Wysocki" , Viresh Kumar , Hridya Valsaraju , sspatil@google.com, kaleshsingh@google.com, Linux Kernel Mailing List , Linux PM , "Cc: Android Kernel" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 16, 2019 at 10:39 AM Greg Kroah-Hartman wrote: > > On Tue, Jul 16, 2019 at 10:30:48AM +0200, Rafael J. Wysocki wrote: > > On Tue, Jul 16, 2019 at 4:13 AM Greg Kroah-Hartman > > wrote: > > > > > > On Mon, Jul 15, 2019 at 11:48:27PM +0200, Rafael J. Wysocki wrote: > > > > On Mon, Jul 15, 2019 at 11:44 PM Tri Vo wrote: > > > > > > > > > > Userspace can use wakeup_sources debugfs node to plot history of suspend > > > > > blocking wakeup sources over device's boot cycle. This information can > > > > > then be used (1) for power-specific bug reporting and (2) towards > > > > > attributing battery consumption to specific processes over a period of > > > > > time. > > > > > > > > > > However, debugfs doesn't have stable ABI. For this reason, create a > > > > > 'struct device' to expose wakeup sources statistics in sysfs under > > > > > /sys/class/wakeup//. > > > > > > > > > > Introduce CONFIG_PM_SLEEP_STATS that enables/disables showing wakeup > > > > > source statistics in sysfs. > > > > > > > > I'm not sure if this is really needed, but I'll let Greg decide. > > > > > > You are right. Having zillions of config options is a pain, who is > > > going to turn this off? > > > > > > But we can always remove the option before 5.4-rc1, so I'll take this > > > as-is for now :) > > > > > > > Apart from this > > > > > > > > Reviewed-by: Rafael J. Wysocki > > > > > > thanks for the review! I'll wait for 5.3-rc1 to come out before adding > > > this to my tree. > > > > So it occurred to me that maybe it's better if I apply it? After all, > > this is PM material. :-) > > Heh, true, feel free to add: > Signed-off-by: Greg Kroah-Hartman > to the patch then. I will, thank you!