Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp306603ybi; Mon, 15 Jul 2019 21:17:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrura6DDioTsawoTWdS05XOPAXuql2hzg3CF9OevNVEF26mmHGEHWwALMsWTnNS24/21AS X-Received: by 2002:a17:902:54d:: with SMTP id 71mr31886108plf.140.1563250639254; Mon, 15 Jul 2019 21:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563250639; cv=none; d=google.com; s=arc-20160816; b=Si0x4UOJs0WShKsCJ2MIkIt8i/AMcmJWuNAHZgDGsYKc90r7cXJnyW4HPTvOTr2C1o NfL7hM+G5zSRyyIwyvebgFs6j+zMdjgKdZAxrUs5I5r7m7EvQIKBI2JW522oCTTDmLrW YqxFO3kSochRQXJKT+qNhebzpALDb3WTulUNQm992zNT2TDA0NBJL6JRb/ePq34QwLuE 5+T0sVjuvOM8EDqfIlfxJgX8imDdP0J6wF912crpS6TkGcOXHu/SSqB/4E/kfKImL6Gb xhPGr/K4QLJY/8HfHHR5k6omZrGdhlMYoyv1Hk8SS0fhsQyJGvdUy4WfRXOydz/i/KOa +SQA== 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:dkim-signature; bh=NWizBVxKl11u9zZiCQ2bgnUadptHwCxpkPEjb6InLlM=; b=PXT3l1vJAGvvCHAeieZY/p+BrcWkvcAMR0/VDTIo2VvFkCOvCid3R/Y4gyZH2rk/xi 2nT3Y8hvCLJx70dviiKBYy09Xz0v79LXdsejdNu4VXWwIhfOTbnMwMRm3Znf4EWhxjjw nq6glGUiNnldv7UvSBQyBTVKsJ6XSh6Bbn9u9nvs75vg/qwOlA02UQx9O92H1Tewx5q2 aZ1CldrJ8pmtDCGf2ovS9a386N3Ty26MJThrcBFXlF12EEJZGUA2NHNqE2vebNCJn9Yz 5pA8SfBGRcD12ga4FwGJ+tNexwxyJYBipZbWtGaUrHp1Y2Hfkp8UVJqUZ3HUhnsAN/BA eTCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=Y2+eRFTF; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=android.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e16si11910099pgt.2.2019.07.15.21.17.03; Mon, 15 Jul 2019 21:17:19 -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; dkim=pass header.i=@android.com header.s=20161025 header.b=Y2+eRFTF; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=android.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbfGPEQf (ORCPT + 99 others); Tue, 16 Jul 2019 00:16:35 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46845 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbfGPEQf (ORCPT ); Tue, 16 Jul 2019 00:16:35 -0400 Received: by mail-ot1-f65.google.com with SMTP id z23so19516114ote.13 for ; Mon, 15 Jul 2019 21:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NWizBVxKl11u9zZiCQ2bgnUadptHwCxpkPEjb6InLlM=; b=Y2+eRFTFLkVWKoQou0f/DY8g8pcZFhms1URLBnrzoFkschHi9zOPZjuQmvbenc7+yv IyFVzLybu3DLX6Gc+3FwcnW5nG1wuIa5+AMQ0Wzzxlc/CpXA/jj9gs/h/arV4Oa/hdwJ Qt8HLGn3KFNkx/CqyUhEWBJnttDVm/+LSa67mEdFvdnPnQ+CA0Ndriu4nm5UUjhdVAhO a2eYWBsxQTgyaDxZddmmBUpDvu5Bi71ihgLHI6Ogt1xrjuFEwu50m1Q7YaPpZfcat/c5 pu7BUO2c3H3I3Ysw9d4aJZc/2OZl0S5QTEJZX4nHJmBIfQ6nN7FI4qWdS4TC9sLiAvj+ imlw== 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=NWizBVxKl11u9zZiCQ2bgnUadptHwCxpkPEjb6InLlM=; b=bVC7JeQNTMEdXWMvYZkjd9Yor+CeiH7KiXbPaqLtq8AVmRaPI4xdls+NaMY4pc50/S Rzw+k1iJ0tMe61Eu0g1tabQQVnxwyMCrcDf9m9orVtMkd1gmOzn4t4c4qx8f1c05IQT+ UuUk5b4jDbBBmEGSK4HUsn3K0yXjmqINRlrRLTWQaAVXk8UvG+Npd4aTyEQZr96Vk6ro Rffls4/kgJJZxkA2wg8T+sHK2ZhfzmwZFQnICOyMPWfz5yps36U/ruio653Mdblbx0et EN8GlvN/4l8sq2NURQwWphIhXlagvvNwmSBpt+PND2CAG9EwQwFpKlVhhGeHa4eFkqOS SYug== X-Gm-Message-State: APjAAAVNLkE53JuhMdIBTvAYe3eo0IxdWKwnLdSMlj8aq1eyo4YSuUJp RUcwLm/kTjZYwz9B7ezPAdSh7j6rRSN8P+6Fnc8= X-Received: by 2002:a9d:1718:: with SMTP id i24mr22110399ota.269.1563250593815; Mon, 15 Jul 2019 21:16:33 -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: Tri Vo Date: Tue, 16 Jul 2019 13:16:22 +0900 Message-ID: Subject: Re: [PATCH v4] PM / wakeup: show wakeup sources stats in sysfs To: Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Viresh Kumar , Hridya Valsaraju , Sandeep Patil , 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 11: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. Greg, Rafael, thanks for taking the time to review this patch!