92f9f3c8 | 06-Nov-2023 |
Harvey Wu <Harvey.Wu@quantatw.com> |
Auto determine failsafe duty according sensor fail
- Auto determine the failsafe duty when sensor failed
example: If PID config as follows, when "Die CPU0" sensor failed, fans in zone 0 will be set
Auto determine failsafe duty according sensor fail
- Auto determine the failsafe duty when sensor failed
example: If PID config as follows, when "Die CPU0" sensor failed, fans in zone 0 will be set to 80%, when "DIMM0" sensor failed, since there is no "FailSafePercent" setting in config, so set to zone's FailSafePercent 100%. ``` { "Class": "temp", ... ... ... "Inputs": [ "Die CPU0" ], "Name": "CPU0 PID", "FailSafePercent": 80.0, ... ... ... "Type": "Pid", "Zones": [ "Zone 0" ] }, { "Class": "temp", ... ... ... "Inputs": [ "DIMM[0-9]", "DIMM1[0-5]" ], "Name": "DIMM CPU0 PID", ... ... ... "Type": "Pid", "Zones": [ "Zone 0" ] }, { "FailSafePercent": 100.0, "MinThermalOutput": 0.0, "Name": "Zone 0", "Type": "Pid.Zone", "ZoneIndex": 0 }, ```
Tested: If zone1 and zone2 into failsafe duty 40% => fan0_pwm | 1Dh | ok | 29.0 | 24.70 unspecifi fan1_pwm | 1Eh | ok | 29.1 | 24.70 unspecifi fan2_pwm | 1Fh | ok | 29.2 | 39.98 unspecifi fan3_pwm | 20h | ok | 29.3 | 39.98 unspecifi fan4_pwm | 21h | ok | 29.4 | 39.98 unspecifi fan5_pwm | 22h | ok | 29.5 | 39.98 unspecifi
cpu0_nbm | 48h | ok | 7.79 | 36 degrees C
Let cpu0_nbm(zone0 and zone2) into failsafe which set failsafe duty as 100% => fan0_pwm | 1Dh | ok | 29.0 | 99.96 unspecifi fan1_pwm | 1Eh | ok | 29.1 | 99.96 unspecifi fan2_pwm | 1Fh | ok | 29.2 | 39.98 unspecifi fan3_pwm | 20h | ok | 29.3 | 39.98 unspecifi fan4_pwm | 21h | ok | 29.4 | 99.96 unspecifi fan5_pwm | 22h | ok | 29.5 | 99.96 unspecifi
cpu0_nbm | 48h | ns | 7.79 | No Reading
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: Iaf5ffd1853e5cd110a1ef66c7a1fd073bc894dda
show more ...
|
1b3b7304 | 04-Oct-2024 |
Harvey Wu <Harvey.Wu@quantatw.com> |
fix CI failed
- Refs about removing add_object_vtable: https://gerrit.openbmc.org/c/openbmc/phosphor-hwmon/+/73009
- initial some struct data
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Chan
fix CI failed
- Refs about removing add_object_vtable: https://gerrit.openbmc.org/c/openbmc/phosphor-hwmon/+/73009
- initial some struct data
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: Iacc62eb1b8cd2b1e092efdbcb3abafb8afb896c7
show more ...
|
bd63bcac | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I0f105c3310e87172c65a09a8787a2db5a4041cc0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
5d897e2a | 04-Jun-2024 |
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> |
Modified the naming to get the value of checkhysterwithsetpt
Modified the naming to get the value of checkhysterwithsetpt in dbus configuration and json configuration.
Change-Id: Ic9cc6a6bfd0da69ac
Modified the naming to get the value of checkhysterwithsetpt
Modified the naming to get the value of checkhysterwithsetpt in dbus configuration and json configuration.
Change-Id: Ic9cc6a6bfd0da69acc1638ca7ebd6712211e2984 Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
show more ...
|
a7bbd458 | 27-Feb-2024 |
Zhikui Ren <zhikui.ren@intel.com> |
remove duplicated header include
This change fixes ci build error.
Change-Id: I613e90f107146bf35d34d72d4a8e78054176a582 Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> |
9f1532dd | 21-Dec-2023 |
Jonico Eustaquio <jonico.eustaquio@fii-na.com> |
Include config.h for strict-failsafe-pwm option
The strict-failsafe-pwm meson option definition was not be seeing by the #ifdefs since the config.h that meson creates that defines the option is not
Include config.h for strict-failsafe-pwm option
The strict-failsafe-pwm meson option definition was not be seeing by the #ifdefs since the config.h that meson creates that defines the option is not included. The strict-failsafe-pwm option can now be enabled by adding EXTRA_OEMESON:append = " -Dstrict-failsafe-pwm=true" to the bbappend.
Change-Id: Ic4047bcd0e4599d14ab84744ffe22d23faa994dd Signed-off-by: Jonico Eustaquio <jonico.eustaquio@fii-na.com>
show more ...
|
7e63502a | 13-Oct-2023 |
Patrick Rudolph <patrick.rudolph@9elements.com> |
pid/fancontroller: Set failsafe PWM in destructor
Introduce a new feature that's guarded by a new meson option 'offline-failsafe-pwm':
After the FanController object was destroyed it can no longer
pid/fancontroller: Set failsafe PWM in destructor
Introduce a new feature that's guarded by a new meson option 'offline-failsafe-pwm':
After the FanController object was destroyed it can no longer regulate the fans. To prevent system failure set all fans to the FailSafePercent defined in the configuration.
In addition to rebuilding configuration it also allows to keep the fans in FailSafe mode as long as the phosphor-pid-control.service is stopped or the system reboots. However this change doesn't cover the case of a program crash where the destructor won't be executed. Abnormal program termination must be handled by systemd and it out of scope of this change.
Tested: 'systemctl stop phosphor-pid-control.service' and see the fans ramp up to FailSafePercent.
Change-Id: I81262b07fd4c1212efc1a4ba4635bde8bc7b5215 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
show more ...
|
9366089a | 13-Oct-2023 |
Patrick Rudolph <patrick.rudolph@9elements.com> |
fancontroller: Add missing config.h
Include config.h to satisfy #ifdef used in those files.
Change-Id: I0f6a3aa750abdf7b7c263d05f0551ee481b98d51 Signed-off-by: Patrick Rudolph <patrick.rudolph@9ele
fancontroller: Add missing config.h
Include config.h to satisfy #ifdef used in those files.
Change-Id: I0f6a3aa750abdf7b7c263d05f0551ee481b98d51 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
show more ...
|
9788963c | 05-Nov-2023 |
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> |
Support to accumulate PWM of different controllers for same sensor
Description: 1. Add one property: accumulateSetPoint in zone of fan table that could be used to enable accumulation of output PW
Support to accumulate PWM of different controllers for same sensor
Description: 1. Add one property: accumulateSetPoint in zone of fan table that could be used to enable accumulation of output PWM of different controllers with same sensor.
2. Add one property: checkHysterWithSetpt in pid info of fan table to select to compare current input and setpoint to check hysteresis.
3. The purpose of accumulate the stepwise output and PID output for one sensor is that the setting of stepwise could use to prevent the fan speed from suddenly increasing from a very low speed to a very high speed due to reaching the setpoint.
Use stepwise before setpoint could also keep the PWM steady at low ambient temperature.
Design: 1. Search "accumulateSetPoint" field in fan table. If the value was true, accumulate the output PWM of different controllers with same profile name.
2. Support two method to calculate PID output that could be chosen by setting the "checkHysterWithSetpt" to true in pid info of fan table.
If the flag was set to true, it won't calculate PWM output if the input lower than setpoint.
Test Case: 1. Check the output PWM of different controllers with same profile name could be accumulated - pass.
2. Set "checkHysterWithSetpt" to true and check PID output would not be calculated if the input temperature was lower than setpoint - pass.
Please see more details in gist: https://gist.github.com/DelphineCCChiu/a6170d3e1a12fc4ee76fad324382fba3
Change-Id: I9f38f250d72545784c6c11be2fde7d45f0b385c4 Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
show more ...
|
df597657 | 19-Dec-2023 |
Josh Lehan <krellan@google.com> |
Changing wording of failsafe transition messages
Cleaning up and unifying the logic around displaying diagnostic messages when failsafe transitions happen, so that the true case and the false case r
Changing wording of failsafe transition messages
Cleaning up and unifying the logic around displaying diagnostic messages when failsafe transitions happen, so that the true case and the false case run the same code path. This makes the messaging more standard and coherent from the user point of view.
This will cause one additional logging message to appear during startup. This is intentional: when the process is started up, this counts as a state transition that is worth logging about, as it goes from uncontrolled state (essentially manual mode) to either failsafe mode or normal mode.
Tested: Installed and observed messages logged during startup
Change-Id: Ib80cc342611a78199410564f76a2c65b590ef511 Signed-off-by: Josh Lehan <krellan@google.com>
show more ...
|
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 ...
|
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 ...
|
cc0232af | 09-Feb-2023 |
Harvey Wu <Harvey.Wu@quantatw.com> |
zone: Add debug interface to zone dbus path
- Add xyz.openbmc_project.Debug.Pid.Zone interface to fanctrl/zoneX dbus to record the PID config name which is driving this zone.
TEST: ``` busctl int
zone: Add debug interface to zone dbus path
- Add xyz.openbmc_project.Debug.Pid.Zone interface to fanctrl/zoneX dbus to record the PID config name which is driving this zone.
TEST: ``` busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0 xyz.openbmc_project.Debug.Pid.Zone NAME TYPE SIGNATURE RESULT/VALUE FLAGS .Leader property s "CPU0_PID" emits-change ```
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: I6fcfa596eec6b51a7727c2a01e7d36e3698eebcf
show more ...
|
9fe3a3c7 | 11-May-2023 |
ykchiu <Chiu.YK@inventec.com> |
Set failsafePwm by pid configuration
<motivation> Current phosphor-pid-control service supports one zone with one failsafepwm. However, for some platforms there are different pluggable cards in a zo
Set failsafePwm by pid configuration
<motivation> Current phosphor-pid-control service supports one zone with one failsafepwm. However, for some platforms there are different pluggable cards in a zone. Different combinations may require different failsafe pwm settings. Why not just use one zone failsafepwm for all the combinations? because if we take power consumption or acoustic into consideration, we will find that not all the cases need the same high failsafepwm. Each case just need high enough failsafepwm to cool down the system in that condition.
For example case1: zone0 : gpuA card + motherboard in zone0 =>requires failsafepwm = 80
case2: zone1 : gpuB card + motherboard in zone0 =>requires failsafepwm = 60
In order to solve the problem described above , we propose the design that. Each pidloop has its own failsafepwm. The final failsafepwm will be calculated during building zone process. The detailed design concept is described in design concept section.
<design concept> a zone has several pid loops, each one has its own pid failsafe pwm defined in its configuration.
The calculation flow goes as below: 1.Take failsafepwm of the pidloops and the zone from the configuration files, if any is missing , set it to zero. 2.Take max value of (zone failsafepwm and pid loops failsafepwm). 3.If the max value from 'step 2' is zero indicates none of failsafepwm is configured, set it to default setting 100%.
<note> 1.this is intended for dbus configuration method, since one zone may have different pidloops from different pluggable boards entity json, but this design also works for static configuration method, therefore, the zone with different boards will need different failsafepwm. 2.keep it back compatible with original design , also take zone failsafepwm into calculation.
Working example as below
Case1 Zone0: zone0 pidloop failsafepwm = 60 gpuA pidloop failsafepwm = 70 Motherboard failsafepwm = 40
=>final failsafepwm = 70
Case2 Zone0: zone0 pidloop failsafepwm = 60 gpuB pidloop failsafepwm = 80 Motherboard failsafepwm = 40
=>final failsafepwm = 80
Change-Id: I5aa1c6a7108f4520f41de5d8eba3075d021bbe79 Signed-off-by: ykchiu <Chiu.YK@inventec.com>
show more ...
|
7c6d35d5 | 10-May-2023 |
ykchiu <Chiu.YK@inventec.com> |
Allow disabling PID loops at runtime
<design concept> Add the map of object enable interface to pid loops in the zone then we can disable/enable each pid loop process in a zone by dbus command.
[no
Allow disabling PID loops at runtime
<design concept> Add the map of object enable interface to pid loops in the zone then we can disable/enable each pid loop process in a zone by dbus command.
[note] Enable = true : enable process (default) Enable = false : disable process
Tested: In this case: we set Enable = false to disable pidloop:Zone_Temp_0, and see how it affects the zone final pwm, when pidloop: Zone_Temp_0 in zone 0 is disabled.
then even we are trying to heat up the temperature of a sensor: Temp_0 in pidloop: Zone_Temp_0, this set point of the pidloop will not be taken into the calculation for the final set point of the whole zone.
``` <service object> root@openbmc:/tmp# busctl tree xyz.openbmc_project.State.FanCtrl `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/settings `-/xyz/openbmc_project/settings/fanctrl |-/xyz/openbmc_project/settings/fanctrl/zone0 | |-/xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp | |-/xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp_0 | `-/xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp_1
====Enable process for pidloop:Zone_Temp_0 with p-switch temperature sensor:Temp_0 at runtime==== root@openbmc:~# busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp_0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS xyz.openbmc_project.Object.Enable interface - - - .Enabled property b true emits-change writable
====Disable process for pidloop:Zone_Temp_0 with p-switch temperature sensor: Temp_0==== root@openbmc:~# busctl set-property xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp_0 xyz.openbmc_project.Object.Enable Enabled b false root@openbmc:~# busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp_0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS xyz.openbmc_project.Object.Enable interface - - - .Enabled property b false emits-change writable ```
when Disable the process of the pidloop: Zone_Temp_0, the requester switches from Zone_Temp_0 to the others, when you enable the pidloop: Zone_Temp_0, the setpoint of Zone_Temp_0 will be take into consideration again
Change-Id: I95ae700144f0d16049fff8b309f05ae690a7ef72 Signed-off-by: ykchiu <Chiu.YK@inventec.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 ...
|
df1f183f | 14-Nov-2022 |
Tom Tung <shes050117@gmail.com> |
pid: reuse the code for processing sensors input
The code for processing sensors' inputs are the same in updateFanTelemetry() and updateSensors(). This patch extract the similar code out as a privat
pid: reuse the code for processing sensors input
The code for processing sensors' inputs are the same in updateFanTelemetry() and updateSensors(). This patch extract the similar code out as a private function and make it be called in these two functions.
Tested: - Can still build phosphor-pid-control. - Copy built image to the system and it works fine.
Change-Id: I6249053e788bfa14bb7bdf2a880be5403c20029b Signed-off-by: Tom Tung <shes050117@gmail.com>
show more ...
|
239aa7d7 | 17-Nov-2022 |
Harvey Wu <Harvey.Wu@quantatw.com> |
Replace some duplicate codes about time setting
- Replace duplicate codes in pid/buildjson.cpp and dbusconfiguration.cpp
TEST: D-Bus config => { "FailSafePercent": 90.0,
Replace some duplicate codes about time setting
- Replace duplicate codes in pid/buildjson.cpp and dbusconfiguration.cpp
TEST: D-Bus config => { "FailSafePercent": 90.0, "MinThermalOutput": 0.0, "CycleIntervalTimeMS": 101, "UpdateThermalsTimeMS": 1000, "Name": "Zone 0", "Type": "Pid.Zone", "ZoneIndex": 0 }, { "FailSafePercent": 90.0, "MinThermalOutput": 0.0, "CycleIntervalTimeMS": 100, "Name": "Zone 1", "Type": "Pid.Zone", "ZoneIndex": 1 }, { "FailSafePercent": 100.0, "MinThermalOutput": 0.0, "UpdateThermalsTimeMS": -1000, "Name": "Zone 2", "Type": "Pid.Zone", "ZoneIndex": 2 },
pid journal log => Mar 09 04:49:23 qbmc swampd[4823]: Zone 1: UpdateThermalsTimeMS cannot find setting. Use default 1000 ms Mar 09 04:49:24 qbmc swampd[4823]: Zone 2: CycleIntervalTimeMS cannot find setting. Use default 100 ms Mar 09 04:49:24 qbmc swampd[4823]: Zone 2: UpdateThermalsTimeMS is invalid. Use default 1000 ms
Static JSON => { "id": 0, "minThermalOutput": 0.0, "failsafePercent": 100.0, "cycleIntervalTimeMS": 100, "updateThermalsTimeMS": 1000, ... ... { "id": 1, "minThermalOutput": 0.0, "failsafePercent": 100.0, "updateThermalsTimeMS": 0,
pid journal log => Mar 09 04:38:44 qbmc swampd[10646]: Zone 1: cycleIntervalTimeMS cannot find setting. Use default 100 ms Mar 09 04:38:44 qbmc swampd[10646]: Zone 1: updateThermalsTimeMS is invalid. Use default 1000 ms
Change-Id: I75d272d9458978790d2b8fe2def35a0e6ba126b0 Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
show more ...
|
56ed7870 | 15-Dec-2022 |
Josh Lehan <krellan@google.com> |
Fixing crash when core logging was enabled
The operator=() function tried to use the "=" operator to copy the entire structure at once, which of course called the same function again, leading to inf
Fixing crash when core logging was enabled
The operator=() function tried to use the "=" operator to copy the entire structure at once, which of course called the same function again, leading to infinite recursion, and thus, segfault.
Worked around this braino by simply copying each field individually, forgoing the convenience of copying the structure as a whole.
Tested: Use of the core logging feature no longer crashes
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Id472d03409296a45bb14180f5c1897dfb42be1aa
show more ...
|
9f9a06aa | 14-Dec-2022 |
Josh Lehan <krellan@google.com> |
Fix interval calculation bug and D-Bus init
The new timing parameters were not settable from the D-Bus code path, only from the old static JSON code path. Also, the divison would not occur, causing
Fix interval calculation bug and D-Bus init
The new timing parameters were not settable from the D-Bus code path, only from the old static JSON code path. Also, the divison would not occur, causing the variable to remain at 1000 by default, not 10, causing the thermal intervals to run 100 times slower than intended!
I fixed the algorithm used to calculate when the thermal intervals should be inserted amongst the fan intervals. Now, the division is not necessary, and any value should work, so long as the thermal interval is greater than or equal to the fan interval.
I also fixed a subtle bug regarding the timer scheduling. It was reinitializing the timer expiration time from "now" each interval, instead of cleanly incrementing from the original expiration. This caused the timer to run slower than intended, as the execution time of each interval would not be subtracted out from the remaining time that needs to be waited for, as it should have been.
Tested: Default values, for timing parameters, now work as intended
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I759387b97af3ce93a76459faf5e9e7be3474016e
show more ...
|
c612c051 | 12-Dec-2022 |
Josh Lehan <krellan@google.com> |
Allow derivativeCoeff and DCoefficient optional
To avoid breaking existing configurations in the field, treat the new "derivativeCoeff" parameter as optional, not mandatory.
This affects both the o
Allow derivativeCoeff and DCoefficient optional
To avoid breaking existing configurations in the field, treat the new "derivativeCoeff" parameter as optional, not mandatory.
This affects both the old JSON parser, and the new D-Bus entity-manager parser (it's called "DCoefficient" there).
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Ifcaf47d66e009b48e41b510a2ef1686b8860ad35
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 ...
|
d38ae279 | 13-Nov-2020 |
Josh Lehan <krellan@google.com> |
FanController: Use raw RPM as input to fan PID loop
The fan PID loop was wrongly using normalized RPM as input, instead of raw RPM. This meant that the input RPM was between 0.0 and 1.0, the wrong u
FanController: Use raw RPM as input to fan PID loop
The fan PID loop was wrongly using normalized RPM as input, instead of raw RPM. This meant that the input RPM was between 0.0 and 1.0, the wrong units, an unusable low value for RPM.
What's more, the inputProc() function used int64_t instead of double, for an unknown reason, as the input and output of this function is double. This integer truncation caused the normalized RPM to always be zero, making this bug harder to notice.
Cleaned up the inputProc() function to always use double, and correctly use the raw RPM.
I am really glad I had earlier added a feature to maintain the raw unscaled value, along with the normalized scaled value, in the cache! https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-pid-control/+/36697
This made it easy to recover the raw value. Otherwise, this bug would have been much harder to fix.
Tested: The RPM input values now use same units as the setpoint, restoring proper fan PID loop operation, as logged in the new PID core debugging feature here: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-pid-control/+/38087
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I4607d9ebee57cea04b8f83d658913e24200a6428
show more ...
|
de74542c | 07-Nov-2020 |
Josh Lehan <krellan@google.com> |
Adding new feature of core PID loop logging
This differs from the normal logging, as this focuses on the core of the PID loop computations.
All variables within the core pid/ec/pid.cpp pid() functi
Adding new feature of core PID loop logging
This differs from the normal logging, as this focuses on the core of the PID loop computations.
All variables within the core pid/ec/pid.cpp pid() function are now logged, so math can be debugged.
Output is throttled to only log a new line when it changes, or when 60 seconds have elapsed.
Creates 2 files for each PID loop, one showing coefficients that were configured for it, and one showing the variables changing over time.
Enable by --corelogging command line option, or by creating /etc/thermal.d/corelogging file.
Tested: Log files appear as expected, when enabled. No changes noticed, when this feature is disabled.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I3f37fe918e7cbc6fb885ffa2f268600d5a317d32
show more ...
|