Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570111 > unrolled thread

unstable /sys interface from hmon

Started byDaniel Walker <danielwa@cisco.com>
First post2017-01-30 21:50 +0100
Last post2017-01-31 00:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  unstable /sys interface from hmon Daniel Walker <danielwa@cisco.com> - 2017-01-30 21:50 +0100
    Re: unstable /sys interface from hmon Guenter Roeck <linux@roeck-us.net> - 2017-01-31 00:20 +0100

#1570111 — unstable /sys interface from hmon

FromDaniel Walker <danielwa@cisco.com>
Date2017-01-30 21:50 +0100
Subjectunstable /sys interface from hmon
Message-ID<t5r3I-8h-9@gated-at.bofh.it>
Hi,

Cisco recently upgraded to kernel 4.4.. We have applications which use the /sys interfaces for some hmon drivers.
We found that the following patches,

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bab2243ce1897865e31ea6d59b0478391f51812b
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c3b7cddc70075d525db6b3068d8b2b9158eedc84

Altered the interface as seen from userspace. These patches changed the paths in the following way,

Before,
/sys/bus/i2c/devices/14-0050/

After,
/sys/bus/i2c/devices/14-0050/hwmon/hwmon7

My impression was that /sys was suppose to be stable, and debugfs was unstable. I'm not sure what the current guidelines are
for this, but we would request that hmon drivers maintain a stable interface from /sys. This change has cause upgrade issues
for us which we would like to avoid in the future.

A patch to add in a compatibility layer would be welcome.

Daniel

[toc] | [next] | [standalone]


#1570180

FromGuenter Roeck <linux@roeck-us.net>
Date2017-01-31 00:20 +0100
Message-ID<t5toR-1Ee-5@gated-at.bofh.it>
In reply to#1570111
On Mon, Jan 30, 2017 at 12:37:14PM -0800, Daniel Walker wrote:
> Hi,
> 
> Cisco recently upgraded to kernel 4.4.. We have applications which use the /sys interfaces for some hmon drivers.
> We found that the following patches,
> 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bab2243ce1897865e31ea6d59b0478391f51812b
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c3b7cddc70075d525db6b3068d8b2b9158eedc84
> 
> Altered the interface as seen from userspace. These patches changed the paths in the following way,
> 
> Before,
> /sys/bus/i2c/devices/14-0050/
> 
> After,
> /sys/bus/i2c/devices/14-0050/hwmon/hwmon7
> 

Actually, the stable link to use would be /sys/class/hwmon/hwmon7
in both cases, and to check if the name attribute resides in hwmon7
or in hwmon7/device (which is the real change in your case - it moved
from hwmon7/device to hwmon7, ie from the parent device to the hwmon
device).

> My impression was that /sys was suppose to be stable, and debugfs was unstable. I'm not sure what the current guidelines are
> for this, but we would request that hmon drivers maintain a stable interface from /sys. This change has cause upgrade issues
> for us which we would like to avoid in the future.
>
The key transition is the move from attaching the attributes to the parent
device (here: the i2c device) to the hwmon device. libsensors handles this
transition transparently; I assume you are not using it ?

> A patch to add in a compatibility layer would be welcome.
> 
A compatibility layer would have to link each attribute back to the parent
device. Interesting idea, actually. I'll check if that is possible.

Thanks,
Guenter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web