From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C11B9C76188 for ; Tue, 16 Jul 2019 09:36:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9605B21721 for ; Tue, 16 Jul 2019 09:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563269783; bh=t88nKdjZ2FTiC4ap6ZpayQlOpvnb1vuZBZTw7pcN/zE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=ZKyZqxT3YfMMsXh889E24bAw/qVsibpNQnC5QRbmLDzlArKs0uF3uRDWsTTiCuPGB t19zX83P/hNsrCIhYXK0HyiTXRLevLWtvUK3wmoLgicVAxb3HydyTBfOkHsDxn2DBe zG32A2r1ssXNu3FsZ7ibIqdYDDzSg71ukSQwkp9E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730520AbfGPJgX (ORCPT ); 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-Google-Smtp-Source: APXvYqye2+Yv37nNrcFQcvVln6e3m1X/j98CGzS3EPlCaDhA5GjsKAwkzyxHc/KXubRpuEM050HrcaBQEwoNGF3DgEA= 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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!