Re: [PATCH v1 2/2] PM: Add config flag to gate sysfs wakeup_sources
From: Samuel Wu
Date: Fri Mar 20 2026 - 20:47:02 EST
On Fri, Mar 20, 2026 at 9:09 AM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
>
[ ... ]
> >
> > +config PM_WAKEUP_STATS_SYSFS
> > + bool "Sysfs wakeup statistics"
> > + depends on PM_SLEEP
> > + default y
> > + help
> > + Enable this for wakeup statistics in sysfs under /sys/class/wakeup/
> > +
> > + Disabling this option eliminates the work of creating the wakeup
> > + sources and each of their attributes in sysfs. Depending on the
> > + number of wakeup sources, this can also have a non-negligible memory
> > + impact. Regardless of this config option's value, wakeup statistics
> > + are still available via debugfs and BPF.
>
> Well, except that otherwise it may be hard to figure out which device
> the given wakeup source belongs to, so I'd rather not do that.
>
Since the config flag defaults to yes, this wouldn't affect current
users right? And then the idea is that other users who don't need this
sysfs node can turn the flag off to save some cycles and memory.
[ ... ]