[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJWu+oqSgcBVhDY7CjWpNQrK=XiKAb5S-YSp=6-UM--UFmKvGQ@mail.gmail.com>
Date: Wed, 19 Jun 2019 12:53:12 -0400
From: Joel Fernandes <joelaf@...gle.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Tri Vo <trong@...roid.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Sandeep Patil <sspatil@...roid.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
Hridya Valsaraju <hridya@...gle.com>,
Linux PM <linux-pm@...r.kernel.org>,
"Cc: Android Kernel" <kernel-team@...roid.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Alexei Starovoitov <ast@...com>
Subject: Re: Alternatives to /sys/kernel/debug/wakeup_sources
On Wed, Jun 19, 2019 at 4:35 AM Rafael J. Wysocki <rafael@...nel.org> wrote:
>
> On Wed, Jun 19, 2019 at 1:52 AM Joel Fernandes <joelaf@...gle.com> wrote:
> >
> > On Tue, Jun 18, 2019 at 7:15 PM Tri Vo <trong@...roid.com> wrote:
[snip]
> > > > > If no, then we would love to hear suggestions for any changes that need to be
> > > > > made or we simply just move the debugfs entry into somewhere like
> > > > > /sys/power/ ?
> > > >
> > > > No, moving that entire file from debugfs into sysfs is not an option either.
> > > >
> > > > The statistics for the wakeup sources associated with devices are already there
> > > > under /sys/devices/.../power/ , but I guess you want all wakeup sources?
> > > >
> > > > That would require adding a kobject to struct wakeup_source and exposing
> > > > all of the statistics as separate attributes under it. In which case it would be
> > > > good to replace the existing wakeup statistics under /sys/devices/.../power/
> > > > with symbolic links to the attributes under the wakeup_source kobject.
> > >
> > > Thanks for your input, Rafael! Your suggestion makes sense. I'll work
> > > on a patch for this.
> >
> > Does that entail making each wake up source, a new sysfs node under a
> > particular device, and then adding stats under that new node?
>
> Not under a device, because there are wakeup source objects without
> associated devices.
>
> It is conceivable to have a "wakeup_sources" directory under
> /sys/power/ and sysfs nodes for all wakeup sources in there.
One of the "issues" with this is, now if you have say 100 wake up
sources, with 10 entries each, then we're talking about a 1000 sysfs
files. Each one has to be opened, and read individually. This adds
overhead and it is more convenient to read from a single file. The
problem is this single file is not ABI. So the question I guess is,
how do we solve this in both an ABI friendly way while keeping the
overhead low.
Thanks,
- Joel
Powered by blists - more mailing lists