History log of /openbmc/phosphor-pid-control/util.cpp (Results 1 – 11 of 11)
Revision Date Author Comments
# 3f0f7bc3 13-Feb-2023 Josh Lehan <krellan@google.com>

Add MissingIsAcceptable feature to avoid failsafe

This is a partial implementation of the ideas here:
https://github.com/openbmc/phosphor-pid-control/issues/31

A new configuration item is supported

Add MissingIsAcceptable feature to avoid failsafe

This is a partial implementation of the ideas here:
https://github.com/openbmc/phosphor-pid-control/issues/31

A new configuration item is supported in the PID object, named
"MissingIsAcceptable" (for D-Bus) or "missingIsAcceptable" (for the old
config.json). The value is an array of strings. If these strings match
sensor names, those sensors will be flagged as "missing is acceptable",
that is, they can go missing and the zone will not be thrown into
failsafe mode as a result.

This can be handy for sensors that are not always available on your
particular machine. It is independent of the existing Availability
interface, because the decision to go into failsafe mode or not is a
property of the PID loop, not of the sensor itself.

If a PID loop consists of all sensors that are missing, the output
will be deemed to be the setpoint, thus essentially making the PID
loop a no-op. Now initializing sensor values to NaN, not zero, as zero
is not a good default if PID loop is margin, undoing a bug I made:
https://gerrit.openbmc.org/c/openbmc/phosphor-pid-control/+/38228

Tested: It worked for me. Also, added a unit test case.

Change-Id: Idc7978ab06fcc9ed8c6c9df9483101376e5df4d1
Signed-off-by: Josh Lehan <krellan@google.com>

show more ...


# 31058fd3 13-Jan-2023 Josh Lehan <krellan@google.com>

Implementing the TempToMargin feature

Wrapping the input name std::string in a new structure SensorInput, so
that the TempToMargin information can be cleanly carried along with
it, all the way down

Implementing the TempToMargin feature

Wrapping the input name std::string in a new structure SensorInput, so
that the TempToMargin information can be cleanly carried along with
it, all the way down to the PID input processing layer where it is
needed. This allows the conversion to be done just-in-time before the
temperature reading is interpreted, minimizing the blast radius of
this change. Nonetheless, because of the type change, there was a
somewhat large blast radius to implement this feature.

The design, and the documentation, is already here:
https://github.com/openbmc/phosphor-pid-control/issues/23

Tested: Added unit tests for JSON parsing and for proper execution
of the TempToMargin feature. They pass. Ran it locally, on our
appropriately-configured system, and it seems to work for me.

Change-Id: I598ba485195aaa70c26e91a1da3ab88fff8c3a4c
Signed-off-by: Josh Lehan <krellan@google.com>

show more ...


# 8c051121 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Icbc50d46e84ee7ef756705e2b19741439a325074
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

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 ...


# 39199b4d 08-Oct-2020 Patrick Venture <venture@google.com>

dbus: move debugPrint to util

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Idbea54f13527a4ca3108cc4dccbee07b7b3a7d34


# 081b035f 15-Jul-2019 Patrick Venture <venture@google.com>

bugfix: writePath is the dbus object path for the sensor

For the sensor, if writePath is used for dbus active, it is always
FanPwm (presently) and needs to be the object path.

T

bugfix: writePath is the dbus object path for the sensor

For the sensor, if writePath is used for dbus active, it is always
FanPwm (presently) and needs to be the object path.

Tested: Not tested, only code inspected.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I4eafaff4316aac9dab9a2c9e1bd61093a670b023

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 ...


# da4a5dd1 31-Aug-2018 Patrick Venture <venture@google.com>

add .clang-format

Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f
Signed-off-by: Patrick Venture <venture@google.com>


# 7136a5ae 19-Jul-2018 James Feist <james.feist@linux.intel.com>

Add ability to configure from dbus

This allows configuration of PID control from dbus using
entity manager. Sample configuration will be pushed to
entity-manager repo shortly.

Add ability to configure from dbus

This allows configuration of PID control from dbus using
entity manager. Sample configuration will be pushed to
entity-manager repo shortly.

Tested-by: Used yaml configuration and dbus / entity-manager
based configuration and pid seemed to work the same.
Verified printout of configuration matched generated
cpp files.

Change-Id: Ia7b016e53262791ffcccdb9b21c1ccddae2926bc
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 1df1a2c8 10-May-2018 Patrick Venture <venture@google.com>

util: remove unused variable

Variable became obsolete and was left in although unused.

Change-Id: I2953c1eea836fb96812a8834f1776aff16b76745
Signed-off-by: Patrick Venture <ventu

util: remove unused variable

Variable became obsolete and was left in although unused.

Change-Id: I2953c1eea836fb96812a8834f1776aff16b76745
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# e620656c 08-Mar-2018 Patrick Venture <venture@google.com>

Scripts and main daemon

This includes the scripts for the YAML parsing and the
main execution point.

Change-Id: If42154c621353b23370b63d4e58f6c75bca8b356
Signed-off-by: Patr

Scripts and main daemon

This includes the scripts for the YAML parsing and the
main execution point.

Change-Id: If42154c621353b23370b63d4e58f6c75bca8b356
Signed-off-by: Patrick Venture <venture@google.com>

show more ...