Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp549091ybi; Tue, 16 Jul 2019 01:33:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6y240veXR95ng+nhfBdrQ5vf7wLCTdmk5cSKJ8A0ScYCFUkBU/84uCiO3JS4qLcuocIWh X-Received: by 2002:a17:90a:4803:: with SMTP id a3mr35368282pjh.58.1563265985877; Tue, 16 Jul 2019 01:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563265985; cv=none; d=google.com; s=arc-20160816; b=avhuDvX9/9tHQrO7YVQwr8taKxCGjfzTPXdKai45mEmJUjYD5uJd9RTX0v6CPZ1QIl 7gmbfRuN2/MeDRarw/DJpPRhvqsggxPPfyWEhKKorq7HLcpJ6X82uwbJvWJ2LS5EsSe9 ccNeGtmxnZTVCTNf5BDGCSRFesfOmvdm2TN/OH1emC7Bb8fgRR3aAQATjO4E7Ua1DxJg sVq//TNhkg25LAiU8MmetaRMaMwDj44GxXQgJMk7zBRKn5iXgeNoHiWvtEJR7fQmpnPT SXupY4N3ERu7iwWpdm23jHw7mrx2jUobzkWOpVKXyYHjhUOL5i/CcV+4vRXwTMShyG8Y dQSw== 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=dabMYehwAIOMgEox85e65RbhyQ/W0kLnSfW8PvyFA3o=; b=qpEJ5/54yqL8x8eBVg8t5NL21BnSIp4Qt83KQgpZtKxj2PWMOXmCVHdrEY0UHE6vUs z7wHfI6FRpQLQn4odk4NpeyF7zMvB3/cwflTh5x73WglZOFvLY2hOTzalrxWvi23yxfL qQiKUxkTm+H6hgLTIVq7NxeQsdJU1txopPH6i/rL23HdV+CckxedclZm5yibWXC1p4V3 if56CETITsJRRBpaILXKxTNwCaid1kBsFAWYXVgOqizSY3uFXBbWgcWWNFVLxc2ngM1o 7JVpcjwqv1TNh4q710ZZM7zAkQQNPL8Fqm5qUC6eP5DmqrVzrCzBvM08P36FGm22CUjn v3qg== 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 h69si19548443pge.543.2019.07.16.01.32.49; Tue, 16 Jul 2019 01:33:05 -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 S1731347AbfGPIbD (ORCPT + 99 others); Tue, 16 Jul 2019 04:31:03 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:40371 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730984AbfGPIbC (ORCPT ); Tue, 16 Jul 2019 04:31:02 -0400 Received: by mail-oi1-f196.google.com with SMTP id w196so14900102oie.7; Tue, 16 Jul 2019 01:31:01 -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=dabMYehwAIOMgEox85e65RbhyQ/W0kLnSfW8PvyFA3o=; b=eHf8/UFhq1zrW/GQXHa1Yi1GYxobGWDocrxbrhw9YnX1BSvRF2h5Kb8zoJEkaNnJkD WU1awxn1Neb8h9hHV6KKAh2TyC+tPzwFmtS5T5yAUlFiRr4CzM7imiNurbD/hbQ6x4aR 4aYjgnqCypx7JdVc7wTGj8Ud8kqyE/kG3g8q2neAfX1U+ea18wrB0K6uVi3V/8/YqAGx 2YeOwC19RE/TUfOIQ8hmxd/dgyX26SXtc0NgUiS1kr5zU8S9WVF+oKQkf8BdiuOxGzTm OSsP9tWKOfx/VfswKOZbkOO5XGvSKt37GQpFkP8MMHfALLl0hNB8cfV8YSEX925IQZLQ iQlQ== X-Gm-Message-State: APjAAAX1unlcL5zr6WSf0o+lXSaJLE1B28uq1zakBjjRwzKsRzphSahi /fhs7DwVjQPEj+8ilVxbTo42u+s0xldUhoc2zTo= X-Received: by 2002:aca:4e89:: with SMTP id c131mr15794912oib.57.1563265861459; Tue, 16 Jul 2019 01:31:01 -0700 (PDT) MIME-Version: 1.0 References: <20190715203651.GA7513@kroah.com> <20190715214348.81865-1-trong@android.com> <20190716021102.GA8310@kroah.com> In-Reply-To: <20190716021102.GA8310@kroah.com> From: "Rafael J. Wysocki" Date: Tue, 16 Jul 2019 10:30:48 +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 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. :-) It is fine by me either way, but then I'm not sure if you want to get future bug reports related to this if any ...