RFC Use udev for accessing sysfs
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest9 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | build with udev libraryconfigure.ac src/ | +8 | 0 replies | |
| 2/9 | add udev helper functionssrc/ src/ src/ | +59 | 0 replies | |
| 3/9 | usb_tunable: use udevsrc/ src/ | +47 | 0 replies | |
| 4/9 | syfs_tunable: use udevsrc/ src/ | +10 | 0 replies | |
| 5/9 | runtime_tunable: use udevsrc/ src/ src/ +1 more | +56 | 0 replies | |
| 6/9 | replace pciutils usage with udevhwdbsrc/ src/ src/ | +31 | 2 replies | |
| 7/9 | runtime_pm: use udevsrc/ | +27 | 0 replies | |
| 8/9 | remove libpci and most dead codeAndroid.mk README configure.ac +4 more | +2 | 0 replies | |
| 9/9 | calibrate: use udevsrc/ | +12 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Powertop] [RFC 0/9] Use udev for accessing sysfs
From: Nanley Chery <nanley.g.chery(a)intel.com>
This patch series changes PowerTOP's method of accessing sysfs (for tunables mainly) from explicitly accessing files to using the standard udev device management library and API.
The current codebase collects data on devices by probing sysfs files directly with the usual low-level file handling API. This method is not recommended by the Linux kernel maintainers because the sysfs organization is not guaranteed to be stable over time. This can lead to dependent applications breaking with newer kernel releases. Instead using an abstraction layer, like udev, is suggested
(see https://www.kernel.org/doc/Documentation/sysfs-rules.txt).
The benefits of switching to udev include:
* The removal of libpci and a reduction in repetitive code.
* Improved readability of the tunable code.
* Faster reading of device state values due to caching provided by udev.
I've tried to make this transition as simple as possible by including the bare minimum of changes required for this feature. There's at least one more tunable that can be converted (i2c), but I would like to get feedback on the current implementation first.
Nanley Chery (9):
build with udev library
add udev helper functions
usb_tunable: use udev
syfs_tunable: use udev
runtime_tunable: use udev
replace pciutils usage with udevhwdb
runtime_pm: use udev
remove libpci and most dead code
calibrate: use udev
Android.mk | 1 - README | 1 - configure.ac | 20 ++----- src/Makefile.am | 6 +- src/calibrate/calibrate.cpp | 44 ++++---------- src/devices/runtime_pm.cpp | 105 +++++++++++--------------------- src/devices/runtime_pm.h | 1 + src/lib.cpp | 100 +++++++++++++++++++++---------- src/lib.h | 7 ++- src/main.cpp | 4 +- src/tuning/runtime.cpp | 139 +++++++++++++------------------------------ src/tuning/runtime.h | 6 +- src/tuning/tuningsysfs.cpp | 12 +++- src/tuning/tuningsysfs.h | 1 + src/tuning/tuningusb.cpp | 142 ++++++++++++++------------------------------ src/tuning/tuningusb.h | 5 +- 16 files changed, 231 insertions(+), 363 deletions(-)
Signature · 1 line
2.4.1