#
b300575e |
| 22-Feb-2022 |
Josh Lehan <krellan@google.com> |
pid/zone: Adding unscaled to cache and logging
The "ReadReturn" structure, and the cache within DbusPidZone, have been widened, to hold both the scaled and the original unscaled values at the same t
pid/zone: Adding unscaled to cache and logging
The "ReadReturn" structure, and the cache within DbusPidZone, have been widened, to hold both the scaled and the original unscaled values at the same time. This allows logging to show both at once, and also clears up confusion/bugs resulting from storing one or the other and losing track of which was which.
Compatibility setValue() and getCachedValue() functions still retained, so this will not break other sensors. These functions still only take a single argument/return, which will be used for both value and unscaled, indicating scaling is unknown or irrelevant to this sensor.
Also, the PWM output of the PID loop appears in the log file, conveniently right alongside the RPM input of the PID loop.
An output cache has been added to the zone interface, and, unlike the input cache, use of it is optional. It is only to help populate the logging, so subclasses are free to ignore it if they want.
Tested: In the logging files, I can see both PWM and RPM, and they are consistent, showing how the PID loop is trying to update the PWM to target the desired RPM.
Example: Here's /tmp/zone_0.log on my system epoch_ms,setpt,fan0_tach,fan0_tach_raw,fan0_tach_pwm,fan0_tach_pwm_raw,bmcmargin_zone0,bmcmargin_zone0_raw,thermal_zone0,thermal_zone0_raw,failsafe 3097918,3818.42,0.748267,11224,0,0,0.724753,56.812,0.745098,62,0 3098022,3818.42,0.748267,11224,0.266666,67,0.724753,56.812,0.745098,62,0 3098132,3818.42,0.748267,11224,0.266666,67,0.724753,56.812,0.745098,62,0
Here's what we can now learn: The desired setpoint is 3818 RPM. The fan is at 74.8% of scale, which is 11224 RPM. The written PWM, after the first PID loop pass, is a raw value of 67, which is 26.6% of scale. The first margin temperature is 56.8 degrees of margin, which is 72.4% of scale. The second margin temperature is 62 degrees of margin, which is 74.5% of scale. This zone is not in failsafe mode. As you can see, this will be rather useful for PID loop tuning.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I972a4e4a3b787255f0dcafa10d4498ee58b682f0
show more ...
|
#
b228bc30 |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie36d234f4580029a7832a0cd179f3bb78a1a403f
show more ...
|
#
8f73ad76 |
| 06-Oct-2021 |
Alex.Song <zheng.song@intel.com> |
Make specific UNA sensors not trigger failsafe
By convention, sensors at some states like 'not present', 'power state not matching' are marked as 'unavailable' on dbus. At such states, some specific
Make specific UNA sensors not trigger failsafe
By convention, sensors at some states like 'not present', 'power state not matching' are marked as 'unavailable' on dbus. At such states, some specific sensors should not be considered as failed and trigger pid 'failsafe'.
A typical example is when a system is powered-off, its CPU/DIMM temp sensors are 'unavailable', these sensors should not be treated as 'failed' and trigger pid 'failsafe'. This is necessary for systems whose Fans will keep working when the CPU is off.
This feature is configurable per sensor (valid on thermal sensors). It can be enabled by setting the Pid controller option "InputUnavailableAsFailed" to 'false' when one configuring the PID module via entity-manager, or by setting the sensor option "unavailableAsFailed" to 'false' when one configuring the PID module via JSON. (These options are optional and default to 'true')
Tested: 1. On a Fan 'always-on' system, enabale this feature on CPU temp sensors, poweroff the system, 'unavailable' CPU temp sensors do not trigger the failsafe mode. 2. 'Unavailable' Fans still trigger the failsafe mode. 3. 'Unfunctional' or 'failed' sensors still trigger the failsafe mode.
Signed-off-by: Zheng Song <zheng.song@intel.com> Change-Id: I1dd1d76466f43e7dcf51c161c96714f1bcfae88d
show more ...
|
#
457993f8 |
| 19-Nov-2021 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove usage of deprecated alias The alias `server::match` has been deprecated since 2016. Use the new alias under bus. Signed-off-by: Patrick Williams <patrick@stwc
sdbusplus: remove usage of deprecated alias The alias `server::match` has been deprecated since 2016. Use the new alias under bus. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ibccf347f7016b69f78f74b8debe714b8a0c30ba5
show more ...
|
#
1df9e879 |
| 08-Oct-2020 |
Patrick Venture <venture@google.com> |
drop struct keyword for non-packed objects As a style decision, struct is often used with packed structures to indicate they are used like C-structs. Cleanup this codebase to not use
drop struct keyword for non-packed objects As a style decision, struct is often used with packed structures to indicate they are used like C-structs. Cleanup this codebase to not use the extra struct keyword throughout. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I2f83bb1989e4d1f2f843ba3e45fb82e04f0fa61c
show more ...
|
#
3e2f7581 |
| 21-Sep-2020 |
Josh Lehan <krellan@google.com> |
dbuspassive: Input processing cleanup and allow "margin" The sensor input processing steps have been cleaned up, consolidating code duplicated in two places into one. The new "update
dbuspassive: Input processing cleanup and allow "margin" The sensor input processing steps have been cleaned up, consolidating code duplicated in two places into one. The new "updateValue" function does the processing, then calls "setValue" to set it, if it was acceptable. Initialization of sensor value now uses the same processing path as regular sensor updates, solving a strange discontinuity seen at initialization, where the values had wrong scaling, until the first asynchronous D-Bus sensor update was received. Also cleaned up handling of floating-point NAN received, which has same meaning as old -1 sentinel value, as used back when the D-Bus schema was integer millidegrees. Sensors of type "margin" are now accepted, as they are now processed correctly. Adding new member "_typeMargin" flag to remember margin type, avoiding repeated string computation. Adding new member "_badReading" flag to track the case in which sensor reading is working but gave us bad reading, such as NAN, as this situation differs from already-existing "_failed" flag. Adding new member "_marginHot" flag to request failsafe mode, even though sensor is functional and reading is good, because if we have ran out of margin, PID is not doing the job, and thus we need failsafe mode, to make sure fans spin fast. Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Ia6e2f58967f58ae2999489e3e9342388f7b5fb1a
show more ...
|
#
d0571309 |
| 10-Aug-2020 |
Patrick Venture <venture@google.com> |
dbus/dbuspassive: drop no longer used bus reference Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I7aff262c95bea9afa48cfb388082893b1e065010
|
#
8729eb98 |
| 10-Aug-2020 |
Patrick Venture <venture@google.com> |
Make the dbushelper own its own bus handle. The dbushelper implements an interface that should not be sdbusplus specific. By making the implementation own the sdbusplus aspects, an a
Make the dbushelper own its own bus handle. The dbushelper implements an interface that should not be sdbusplus specific. By making the implementation own the sdbusplus aspects, an alternate implementation can be swapped in. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I4109772499421e2e6497a0fcad663ebbd1210a7c
show more ...
|
#
aadb30dd |
| 10-Aug-2020 |
Patrick Venture <venture@google.com> |
move dbus helper interface into its own file This is step 1 to improving the interface to be more generic and drop requirements on dbus. Signed-off-by: Patrick Venture <venture@
move dbus helper interface into its own file This is step 1 to improving the interface to be more generic and drop requirements on dbus. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I7835ea8242bfb7189cabc1a4084e5f84143d40f6
show more ...
|
#
a076487a |
| 08-Aug-2020 |
Patrick Venture <venture@google.com> |
sensors/zones: place in namespace and cleanup Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I527dbc8477a232945f696227a7b0b2adbee45175
|
#
a83a3ecc |
| 04-Aug-2020 |
Patrick Venture <venture@google.com> |
update clang-format from Latest in docs Updates the clang-format file and then applies it. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia9faf13ce171f90bf07547
update clang-format from Latest in docs Updates the clang-format file and then applies it. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia9faf13ce171f90bf07547efd781139bee23e8c7
show more ...
|
#
4b36f265 |
| 07-Jul-2020 |
James Feist <james.feist@linux.intel.com> |
Mark sensor failed if non-functional Use functional interface as well to determine if a sensor has failed. Tested: Saw fans boost when ME sensors failed by putting ME in rec
Mark sensor failed if non-functional Use functional interface as well to determine if a sensor has failed. Tested: Saw fans boost when ME sensors failed by putting ME in recovery mode Change-Id: I4939d29d10c668c12464dadf40afe6669da8f051 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
98b704e1 |
| 03-Jun-2019 |
James Feist <james.feist@linux.intel.com> |
Add Fan Redundancy Support This adds fan redundancy support to passive sensors. If there are redundancy interfaces on dbus, we'll fail a sensor if the status is set to failed.
Add Fan Redundancy Support This adds fan redundancy support to passive sensors. If there are redundancy interfaces on dbus, we'll fail a sensor if the status is set to failed. Tested: Set Redundancy to Failed On Dbus, saw all fans in collection boost. Then restarted swampd, came up and still boosted. Set redundancy OK, and they all slowed down. Change-Id: I8879bef1471bbc168435d6b22dd20006b9dca133 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
0c8223b5 |
| 08-May-2019 |
James Feist <james.feist@linux.intel.com> |
Consolidate all util.hpp This deletes all lower level util.hpp and cats them into the top level util.hpp to avoid name conflicts. Change-Id: Ia11e4a08053a3970b0aadf21d1156ab26de
Consolidate all util.hpp This deletes all lower level util.hpp and cats them into the top level util.hpp to avoid name conflicts. Change-Id: Ia11e4a08053a3970b0aadf21d1156ab26def36bd Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
f81f2886 |
| 26-Feb-2019 |
James Feist <james.feist@linux.intel.com> |
Expand conf namespace Put rest of conf.hpp in the conf namespace. This is largely a sed replace, and wrapping from_json in conf namespace as it failed to build. Change-Id: I
Expand conf namespace Put rest of conf.hpp in the conf namespace. This is largely a sed replace, and wrapping from_json in conf namespace as it failed to build. Change-Id: I9fe5c7b2fface44618c43af2367035afc39bcb64 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
75eb769d |
| 25-Feb-2019 |
James Feist <james.feist@linux.intel.com> |
dbuspassive: allow scaling For tachs it is beneficial to deal in percent so that multiple controllers can be used with different fan types without having to recalculate. This starts
dbuspassive: allow scaling For tachs it is beneficial to deal in percent so that multiple controllers can be used with different fan types without having to recalculate. This starts using the unused min and max fields to be able to scale readings. Since max and min are commonly on the value interface, the special value of <int64_t>::lowest() allows these to be gathered from dbus instead of having to enter them manually. Tested-by: Moved pid control to percent and printed outputs Change-Id: I9496eb92a18b68a7cd7f034d41d40ef5175c6974 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
f8cb4644 |
| 30-Oct-2018 |
Patrick Venture <venture@google.com> |
dbus: passive: move exception checking into factory Move the exception checking into the factory to remove possibility of exception during construction. Change-Id: I22922f23247c
dbus: passive: move exception checking into factory Move the exception checking into the factory to remove possibility of exception during construction. Change-Id: I22922f23247c0579ee2a3411b5c8cede44fe324c Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
7af157b1 |
| 30-Oct-2018 |
Patrick Venture <venture@google.com> |
style: function names should be lower camel Fix function names to be lower camel. Change-Id: I145e1f4c03d7740bc1525dcffbdce2f78fd61075 Signed-off-by: Patrick Venture <venture@go
style: function names should be lower camel Fix function names to be lower camel. Change-Id: I145e1f4c03d7740bc1525dcffbdce2f78fd61075 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
563a356f |
| 30-Oct-2018 |
Patrick Venture <venture@google.com> |
style: member functions should be lower camel Rename member functions to be lower camel instead of snake case. Change-Id: Ib227fd3dadb6d9607290277205223a4324cd4ce5 Signed-off-by
style: member functions should be lower camel Rename member functions to be lower camel instead of snake case. Change-Id: Ib227fd3dadb6d9607290277205223a4324cd4ce5 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
36b7d8eb |
| 05-Oct-2018 |
James Feist <james.feist@linux.intel.com> |
[dbus-passive] Add threshold fan failure When a threshold is crossed for a monitored sensor, assert fan failure. Tested-by: Changed a sensor threshold so that its current re
[dbus-passive] Add threshold fan failure When a threshold is crossed for a monitored sensor, assert fan failure. Tested-by: Changed a sensor threshold so that its current reading made the threshold asserted and noticed via print messages that the sensor went into failure state. Also noticed fans ramp. Wrote unit test to verify sensor can move in and out of error state correctly. Change-Id: I83182536e4874eaba97f3f1d48d53ac110fba833 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
da4a5dd1 |
| 31-Aug-2018 |
Patrick Venture <venture@google.com> |
add .clang-format Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f Signed-off-by: Patrick Venture <venture@google.com>
|
#
0ef1faf7 |
| 13-Jun-2018 |
Patrick Venture <venture@google.com> |
test: dbus: passive read interface Added basic unit-tests and added a factory for creating the DbusPassive read interface so that it can be nicely error checked. This is handled via
test: dbus: passive read interface Added basic unit-tests and added a factory for creating the DbusPassive read interface so that it can be nicely error checked. This is handled via a valid type check where the only valid types are 'fan' and 'temp'. Change-Id: I558ed09bf509d26f20c6e431bb0789074e9aa841 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
0df7c0fb |
| 13-Jun-2018 |
Patrick Venture <venture@google.com> |
dbus: transition to interface for testing To make testing easier, the dbus objects now receive a helper interface to use instead of calling into a helper module. Tested: Ran on
dbus: transition to interface for testing To make testing easier, the dbus objects now receive a helper interface to use instead of calling into a helper module. Tested: Ran on quanta-q71l board and it behaved as expected. Change-Id: I2521d9c75aec76e92d2e26dc044d01011e44d552 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
863b9246 |
| 08-Mar-2018 |
Patrick Venture <venture@google.com> |
Sensor Objects This includes all the sensor objects including a few implementations, including dbus and sysfs sensors. Change-Id: I9897c79f9fd463f00f0e02aeb6c32ffa89635dbe S
Sensor Objects This includes all the sensor objects including a few implementations, including dbus and sysfs sensors. Change-Id: I9897c79f9fd463f00f0e02aeb6c32ffa89635dbe Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|