On Wed, Jun 19, 2019 at 12:53:12PM -0400, Joel Fernandes wrote: > > 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.
How much overhead? Have you measured it, reading from virtual files is fast :) And how often does this happen? Does it _need_ to happen? Parsing files is also hard, and not for sysfs files, you can't have it both ways. So try it this way, and if there really is a performance issue, we can then talk about it... thanks, greg k-h