History log of /openbmc/phosphor-pid-control/pid/thermalcontroller.cpp (Results 1 – 20 of 20)
Revision Date Author Comments
# 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 ...


# 37180062 01-Oct-2023 Harvey Wu <Harvey.Wu@quantatw.com>

zone: Add debug thermal/power interface

- Add xyz.openbmc_project.Debug.Pid.ThermalPower interface to
fanctrl/zoneX/pid dbus to record some datas in thermal/power
PID loop.

Tested:
```
busctl i

zone: Add debug thermal/power interface

- Add xyz.openbmc_project.Debug.Pid.ThermalPower interface to
fanctrl/zoneX/pid dbus to record some datas in thermal/power
PID loop.

Tested:
```
busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0/CPU0_PID xyz.openbmc_project.Debug.Pid.ThermalPower
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.ClassType property s "Temperature" emits-change
.Input property d 36.594 emits-change
.Leader property s "Die_CPU0" emits-change
.Output property d 4200 emits-change
.Setpoint property d 70 emits-change
```

Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I6846c3878c2ca5eaeeb6eaf48aaf0f604a2beccf

show more ...


# 23e22b90 13-Nov-2022 Josh Lehan <krellan@google.com>

Add new PID Class types "power" and "powersum"

Implements this feature:
https://github.com/openbmc/phosphor-pid-control/issues/24

In addition to the existing "temp" and "margin" classes, adding
new

Add new PID Class types "power" and "powersum"

Implements this feature:
https://github.com/openbmc/phosphor-pid-control/issues/24

In addition to the existing "temp" and "margin" classes, adding
new "power" and "powersum" Class types.

The "power" class is the same as "temp", but expects D-Bus power
sensors, instead of D-Bus temperature sensors.

The "powersum" class is the same as "power", but sums together all of
the given inputs, instead of finding the maximum.

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

show more ...


# c51ba919 12-Oct-2022 Bonnie Lo <Bonnie_Lo@wiwynn.com>

Add debug mode

Description:
1. Could enable debug mode by adding file: /etc/thermal.d/debugging.
$ mkdir /etc/thermal.d
$ touch /etc/thermal.d/debugging
$ systemctl resta

Add debug mode

Description:
1. Could enable debug mode by adding file: /etc/thermal.d/debugging.
$ mkdir /etc/thermal.d
$ touch /etc/thermal.d/debugging
$ systemctl restart phosphor-pid-control

2. Could record fans output PWM, chosen temperature, PID/stepwise output PWM in debug mode.

Design:
1. Create debugging file and restart service to enable debug mode.

2. Check if debug mode is enabled to output fans output PWM, chosen temperature,
PID/stepwise output PWM, and so on.

Test Case:
1. Enable debug mode and check logs: pass

Change-Id: I8527ebcb81e723298ba7e786b4501f986ebd439e
Signed-off-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>

show more ...


# ccc8bb62 17-Feb-2022 Nirav Shah <nirav.j2.shah@intel.com>

For each zone log sensor name with max setpoint

Add sensor name that has the maximum setpoint for a PID zone.
Log a debug message when the sensor is changed.
The name is also added to the log file f

For each zone log sensor name with max setpoint

Add sensor name that has the maximum setpoint for a PID zone.
Log a debug message when the sensor is changed.
The name is also added to the log file for each log record.

Tested:
Override one CPU temperature sensor
busctl set-property xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/DTS_CPU1 xyz.openbmc_project.Sensor.Value Value d 82
Observed log message:
swampd[443]: PID Zone 0 max SetPoint 34.5546 requested by DTS_CPU1

Signed-off-by: Nirav Shah <nirav.j2.shah@intel.com>
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: Ifc12cb9a106da1bf41dd35697210f74ba1b589db

show more ...


# ca791156 21-Sep-2020 Josh Lehan <krellan@google.com>

FanController/ThermalController: Clean up PID input math

Adding checking against floating-point oddities,
such as NAN, +INF, or -INF, appearing as input,
which would mess up the PID

FanController/ThermalController: Clean up PID input math

Adding checking against floating-point oddities,
such as NAN, +INF, or -INF, appearing as input,
which would mess up the PID loop math,
causing corrupt output.

If a fan or thermal input value is NAN, +INF, or -INF,
that value will be omitted from contributing to PID loop input.
If all values were omitted for that PID loop,
existing code already hardcodes a value of 0 for fan,
and I added similar code to also hardcode 0 for thermal.

It makes sense to use a placeholder value of 0 degrees of margin,
because this will make the fans spin fast,
if for some reason the zone is not already in failsafe mode by now.
Note that negative values are not allowed for fan,
but they are allowed for thermal.

Tested: Works for me, and PID loops no longer output garbage
when debugging a sensor malfunction while in tuning mode,
making tuning mode much more usable. If not in tuning mode,
the normal failsafe feature would have kicked in,
masking this garbage from appearing in the output anyway.

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

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


# 9bbf333d 16-Jul-2019 Patrick Venture <venture@google.com>

rename RPMSetPoint to SetPoint

The PIDs were originally focused on collecting RPM set points from
thermal PIDs and then having fan PIDs use the highest value collected,
it doesn't ne

rename RPMSetPoint to SetPoint

The PIDs were originally focused on collecting RPM set points from
thermal PIDs and then having fan PIDs use the highest value collected,
it doesn't need to be strictly an RPM set point.

It does however need to be one type of value.

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

show more ...


# e94bdc41 15-Nov-2018 Patrick Venture <venture@google.com>

pid: add helper methods for thermal controller types

Add helper methods for thermal controller types, such as checking if a
string is a supported thermal type and which type that string

pid: add helper methods for thermal controller types

Add helper methods for thermal controller types, such as checking if a
string is a supported thermal type and which type that string
corresponds to.

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

show more ...


# 734f9535 15-Nov-2018 James Feist <james.feist@linux.intel.com>

Allow multiple inputs to thermal and stepwise controllers

Use std::max to determine which input value to apply.
Also start throwing when inputs are empty as otherwise
there will be a

Allow multiple inputs to thermal and stepwise controllers

Use std::max to determine which input value to apply.
Also start throwing when inputs are empty as otherwise
there will be a nullptr dereference.

Tested-by: Added multiple inputs and application no longer
segfaults and verifed max was being used. Also added unit
tests.

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

show more ...


# 5f59c0fd 11-Nov-2018 Patrick Venture <venture@google.com>

Move all floats to doubles

The code was developed initially around a pid loop implemented using
floats. Therefore, the code was converting back and forth between
double for sensor v

Move all floats to doubles

The code was developed initially around a pid loop implemented using
floats. Therefore, the code was converting back and forth between
double for sensor values as inputs and outputs from this PID loop.

Change-Id: I2d2919e1165103040729c9f16bb84fde3dd6b81b
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 ...


# f77d5a57 23-Oct-2018 Patrick Venture <venture@google.com>

cleanup: move from copy and pointer to just const reference

Originally code passed the object by value, and then later by pointer to
that copy. Convert the code to be more performant by

cleanup: move from copy and pointer to just const reference

Originally code passed the object by value, and then later by pointer to
that copy. Convert the code to be more performant by using a const
reference at all layers of access for this object.

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

show more ...


# 4a2dc4d8 23-Oct-2018 Patrick Venture <venture@google.com>

cleanup: apply constness to read-only iterators

Apply const to read-only iterators to indicate intent more clearly.

Change-Id: Ic14304c69361da203d3d3a900180bd54346acc87
Signed-o

cleanup: apply constness to read-only iterators

Apply const to read-only iterators to indicate intent more clearly.

Change-Id: Ic14304c69361da203d3d3a900180bd54346acc87
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>


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

test: pid: thermalcontroller

Tests for the pid/thermalcontroller module.
Fixes a bug where one could pass an incorrect number of inputs
to the thermalcontroller. This can still be s

test: pid: thermalcontroller

Tests for the pid/thermalcontroller module.
Fixes a bug where one could pass an incorrect number of inputs
to the thermalcontroller. This can still be side-stepped by calling the
constructor directly.

Tested: Ran on quanta-q71l board and it behaved as expected.

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

show more ...


# a58197cf 11-Jun-2018 Patrick Venture <venture@google.com>

test: pid: zone

Add unit-tests for the PID zone module.
Add zone_mock.

Tested: Ran on quanta-q71l board and it behaved as expected.

Change-Id: I51185b2d2daacea6ffb687e8

test: pid: zone

Add unit-tests for the PID zone module.
Add zone_mock.

Tested: Ran on quanta-q71l board and it behaved as expected.

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

show more ...


# 5c7cc545 11-Jun-2018 Patrick Venture <venture@google.com>

pid: zone split out builders

To enable unit-testing, split the builders into their own
object files.

Tested: Ran on quanta-q71l board and it behaved as expected.

Change

pid: zone split out builders

To enable unit-testing, split the builders into their own
object files.

Tested: Ran on quanta-q71l board and it behaved as expected.

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

show more ...


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

PID Objects & Algo

These are the PID controller implementations for fans,
and thermals. This also includes the PID algorithm used.

Change-Id: I30471fbf7a8a7ed65f78bf105970d6281

PID Objects & Algo

These are the PID controller implementations for fans,
and thermals. This also includes the PID algorithm used.

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

show more ...