13.07.2020 15:26, Chanwoo Choi пишет: ... >> BTW, I'm curious what do you think about hiding the unsupported debugfs > > Do you mean that sysfs? Yes, sysfs :) >> attributes per-device instead of returning the -EACCES? > > I considered the hiding of sysfs node too instead of -EACCES. If there is no real userspace (used by a non-developer crowd) that relies on the attributes presence, then it could be fine to change the behaviour, IMO. I know that PowerTOP utility uses the 'trans_stat' attribute, but not sure about the other attributes. > But, > For a long time, devfreq showed the sysfs interface of all devfreq devices > regardless of the kind of devfreq governor. It means that devfreq keeps > the ABI interface. If devfreq hides the unsupported sysfs node > according to the type of governor, it will break the ABI. I didn't notice that it's an ABI already [1]. Should be better not to change the ABI if there is userspace already relying on the old behaviour, otherwise it may be okay to make changes until it will be too late, also given that this is still a "testing" ABI. [1] https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-devfreq Although, the doc doesn't say anything about -EACCES/-EINVAL, so isn't it an ABI change already? Doesn't doc need to be updated in order to reflect the ABI change? For example, doc says that userspace shouldn't care about attribute values which are irrelevant for a selected governor, like in the case of the 'polling_interval' attribute. The doc doesn't say that userspace may get a error. > Although I knew that maybe performance/powersave/userspace didn't use > the 'polling_interval' node, I just returned -EACCESS. The 'polling_interval', 'min/max_freq' and the new 'timer' attributes are all the governor attributes. Would be nice to have a per-device `governor/` directory containing all the governor-specific attributes (without the unrelated attributes), but perhaps it's a bit too late to change it now?