commit | 2a51a9c98f21113aa09d9965ec27612d9a7df28e | [log] [tgz] |
---|---|---|
author | Deepak Kodihalli <dkodihal@in.ibm.com> | Wed Mar 07 02:39:40 2018 -0600 |
committer | Deepak Kodihalli <dkodihal@in.ibm.com> | Mon Apr 09 22:32:25 2018 -0500 |
tree | aea2d258cc6c3d265b2a3b0172123852f00ba70c | |
parent | 6aa24d4406bf1675f846d418b79b6616e61ae4bd [diff] |
performance: setup sysfs read independent of D-Bus Previously, phosphor-hwmon had a polling loop to read the sysfs - it would wakeup every second or when a D-Bus event occurs (in which case it would service D-Bus and then read sysfs). This causes successive D-Bus calls to slow down, because hwmon would be busy in the loop, reading sysfs, after servicing D-Bus. To solve this, schedule the sysfs read independently of the D-Bus event loop : add a timer handler to an sd event loop, and attach the D-Bus event loop to the sd event loop. Tested: An example of how this helped : the 'dcmi sensors' command (to read 50 temperature sensors) would take more than 60 seconds on Witherspoon (based off of master 00f02f3). With this patch, the time taken is about 15 seconds. Resolves openbmc/openbmc#2985. Change-Id: I5f512ed11cb6f5f5d2455863ac8e62b5ada16c7a Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Exposes generic hwmon entries as DBus objects.
To build this package, do the following steps: 1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make To full clean the repository again run `./bootstrap.sh clean`.
To enable the use of Linux features like cgroups prioritization and udev/systemd control, one instance of phosphor-hwmon is intended to be run per hwmon sysfs class instance. This requires an algorithm for selecting a stable, well-known D-Bus busname. The algorithm is <PREFIX>-<ID>.Hwmon<N> where PREFIX is an autoconf configurable prefix (BUSNAME_PREFIX, xyz.openbmc_project by default), ID is a std::hash of the /sys/devices path backing the hwmon class instance, and N is the implemented phosphor-hwmon D-Bus API version.