History log of /openbmc/phosphor-pid-control/util.hpp (Results 1 – 17 of 17)
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 ...


# b228cea2 20-Feb-2021 Hao Jiang <jianghao@google.com>

Retry pidControlLoop in individual context handler

io.context is non-preemptive on single thread, which means if all
restartControlLoops are scheduled within one handler, the resources
which are hel

Retry pidControlLoop in individual context handler

io.context is non-preemptive on single thread, which means if all
restartControlLoops are scheduled within one handler, the resources
which are held by pidControlLoop will never be released even given that
their contexts have been cancelled, since their contexts cannot preempt
the context of restartControlLoops.

We need to schedule restartControlLoops in individual context handlers.
Thus when cancellation signal is broadcasted, context runtime will be
yield from restartControlLoops to pidControlLoop to release resources.

Tested:
With multiple reboot cycle (2 machines with 10 reboot cycle with
interval of 10 min), swampd is stable and functional.

Change-Id: I0c750dcfe73016b71c6cfd693c4f8ed99b12e5d0
Signed-off-by: Hao Jiang <jianghao@google.com>

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


# 84c188fe 10-Aug-2020 Patrick Venture <venture@google.com>

move util methods to dbusutil header

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


# 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@google.com>
Change-I

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


# cdd61349 07-Aug-2020 Patrick Venture <venture@google.com>

Move the sensor utils into their own module

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


# 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: Ia9faf13ce171f90bf07547efd781139bee23e8c7


# 298a95cb 07-Apr-2020 Yong Li <yong.b.li@linux.intel.com>

catch the execption during buildSensors

If there any sensor is being created or deleted,
the buildSenosrs will throw exceptions and the application will crash.
Add a retry logic to catch such except

catch the execption during buildSensors

If there any sensor is being created or deleted,
the buildSenosrs will throw exceptions and the application will crash.
Add a retry logic to catch such exception and try again,
will quit the process finally if failed more than 5 times.

Tested:
Changing the PSU sensor threshold using ipmi commands,
no pid service crash log.

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: Icf96bfb01bce4a3b5c22095f0bef0d793fd8430d

show more ...


# 5ec20270 10-Jul-2019 James Feist <james.feist@linux.intel.com>

Allow setting setpoint based on dynamic thresholds

As we allow dynamic thresholds in dbus-sensors to track
the t-control of dimms etc, we want to be able to set a
setpoint based on a offset from a t

Allow setting setpoint based on dynamic thresholds

As we allow dynamic thresholds in dbus-sensors to track
the t-control of dimms etc, we want to be able to set a
setpoint based on a offset from a threshold. This adds
the ability to create a "SetPointOffset" that is a
threshold of the given sensor. For instance a "SetPointOffset"
of "WarningHigh" would get the sensors "WarningHigh" value
then add the "SetPoint" value to it (commonly negative for
WarningHigh/CriticalHigh).

Tested: Turned on debug print and saw correct setpoint being
loaded into config

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

show more ...


# 1fe08952 07-May-2019 James Feist <james.feist@linux.intel.com>

Make dbusconfiguration reloadable without reboot

Now that asio is being used instead of threads, we can
reload the fan configuration without having to restart the
application. This moves the ownersh

Make dbusconfiguration reloadable without reboot

Now that asio is being used instead of threads, we can
reload the fan configuration without having to restart the
application. This moves the ownership of the passive and host
bus outside of the SensorManager so that it can be recreated
each reload.

Tested: Watched logs and saw full fan config get reloaded
after changing fan configuration

Tested: Ran on json configured system and it behaved as
expected.

Change-Id: I00e6b27f75384fd41de2017b723f159c9691ae97
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: Ia11e4a08053a3970b0aadf21d1156ab26def36bd
Signed-off-by:

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


# 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@google.com>


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

add .clang-format

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


# da064285 12-Jun-2018 Patrick Venture <venture@google.com>

util: enable unit-tests

Start write tests and fix a missing header inclusion.

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


# 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: Patrick Venture <venture@goo

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