#
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 ...
|
#
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 ...
|
#
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 ...
|
#
0e8fc398 |
| 04-Oct-2022 |
Bonnie Lo <Bonnie_Lo@wiwynn.com> |
Support derivative term in PID algorithm and support to set cycle interval time from fan table
1. Support to calculate derivative term in PID algorithm. 2. Add two properties: cycleIntervalTimeMS an
Support derivative term in PID algorithm and support to set cycle interval time from fan table
1. Support to calculate derivative term in PID algorithm. 2. Add two properties: cycleIntervalTimeMS and updateThermalsTimeMS in fan table that could be used to decide "time interval of PID control loop" and "time interval to update thermals' cached value".
Tested:
- PID algorithm: 1. Check pid-control-service could calculate output PWM according to the fan table.
[Test log] root@greatlakes:~# systemctl status phosphor-pid-control -l * phosphor-pid-control.service - Phosphor-Pid-Control Margin-based Fan Control Daemon Loaded: loaded (/lib/systemd/system/phosphor-pid-control.service; enabled; preset: enabled) Active: active (running) since Fri 2018-03-09 05:09:35 PST; 1min 47s ago Main PID: 3105 (swampd) CGroup: /system.slice/phosphor-pid-control.service `-3105 /usr/bin/swampd -c /usr/share/entity-manager/configurations/fan-table.json ... Mar 09 05:10:29 greatlakes phosphor-pid-control[3105]: PID Zone 1 max SetPoint 3.75 requested by PID_NIC_SENSOR_TEMP BMC_SENSOR_FAN0_TACH BMC_SENSOR_FAN2_TACH BMC_SENSOR_FAN4_TACH BMC_SENSOR_FAN6_TACH
- Cycle interval time: 1. Set cycleIntervalTimeMS and updateThermalsTimeMS to 1000 ms in fan table 2. Check service would update thermal every second from debug log.
[Test log] root@greatlakes:~# journalctl -u phosphor-pid-control --since "Mar 09 04:52:16" Mar 09 04:52:16 greatlakes systemd[1]: Started Phosphor-Pid-Control Margin-based Fan Control Daemon. ... Mar 09 04:53:28 greatlakes phosphor-pid-control[2795]: processThermals Mar 09 04:53:28 greatlakes phosphor-pid-control[2795]: processFans Mar 09 04:53:29 greatlakes phosphor-pid-control[2795]: processThermals Mar 09 04:53:29 greatlakes phosphor-pid-control[2795]: processFans Mar 09 04:53:30 greatlakes phosphor-pid-control[2795]: processThermals Mar 09 04:53:30 greatlakes phosphor-pid-control[2795]: processFans
Change-Id: I04e1b440603c3ad66a1e26c96451992785da6fe6 Signed-off-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>
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 ...
|
#
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 ...
|
#
5301aae3 |
| 28-Sep-2020 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Eliminate swampd core dump after D-Bus updates sensors The swamp daemon intializes a list of sensors and uses those to periodically scan the state associated devices. Reading the sensors
Eliminate swampd core dump after D-Bus updates sensors The swamp daemon intializes a list of sensors and uses those to periodically scan the state associated devices. Reading the sensors is done with an async timer, that runs code to re-arm an async timer. There is also a D-Bus update cycle that is independent of the async timer reading the sensors. When the D-Bus updates the number of sensors in the system a new list must be created. In order to create the new list the timers using the old list must be stopped. Only after those timers have stopped may a new list be generated, and a new set of timers started. The two processes are unware of each other. To safely perform the change the pointers to the list of zones and timers must be kept alive until all timer actions complete. Only after all references to the pointers have been release may the new state be built, and new timers started. Prior to this change swampd would throw a SYSSEGV fault due to an attempt to use a pointer that was no longer active. Tested: Issued a "reset -w" (Warm Reset command) from the EFI shell. Waited for the system to reboot, and enter EFI Checked for a core file in /var/lib/systemd/coredump Repeated step 1 if coredump file was not present. Completed 2900+ passes successfully when ealier code failed at less than 800 passes. Change-Id: Iff4607510db579c36dc34d6f76e6eb2f0250a03a Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
b748b68c |
| 16-Aug-2020 |
Patrick Venture <venture@google.com> |
pid/builder: add missing headers Add missing headers for int64_t, string, vector, etc. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Iae47813345ee4ed0e01e6a7f5f
pid/builder: add missing headers Add missing headers for int64_t, string, vector, etc. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Iae47813345ee4ed0e01e6a7f5fb12692d9109a81
show more ...
|
#
2a50eda8 |
| 16-Aug-2020 |
Patrick Venture <venture@google.com> |
pid/builder: switch to structured bindings Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I770117d595fb2dbaa6c6d36b688e215be4ba5d45
|
#
7a98c19a |
| 12-Aug-2020 |
Patrick Venture <venture@google.com> |
use ZoneInterface pointers where Dbus aspect not important The implementation of the ZoneInterface used is the DbusPidZone, however using the ZoneInterface when the Dbus aspect is unimpo
use ZoneInterface pointers where Dbus aspect not important The implementation of the ZoneInterface used is the DbusPidZone, however using the ZoneInterface when the Dbus aspect is unimportant provides for trivial support of other implementations. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I0ed87322904e7f87e5b5c8a50c01144f3d843a10
show more ...
|
#
597ebd67 |
| 11-Aug-2020 |
Patrick Venture <venture@google.com> |
s/PIDZone/DbusPidZone/g Renamed PIDZone to DbusPidZone because this object builds in via inheritance a Dbus implementation of the Mode control interface. Signed-off-by: Patrick
s/PIDZone/DbusPidZone/g Renamed PIDZone to DbusPidZone because this object builds in via inheritance a Dbus implementation of the Mode control interface. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ifc6c11db4952de5909f0e556c41ec25eee217408
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 ...
|
#
7e3f8abe |
| 03-Aug-2020 |
Patrick Venture <venture@google.com> |
pid/builder: make zonePids const Detected with static analyzer tool. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: If5bd0bfce6138fe486a62073e2c471f08ae79cc6
|
#
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 ...
|
#
3484beda |
| 25-Feb-2019 |
James Feist <james.feist@linux.intel.com> |
s/minThermalRPM/minThermalOutput The minThermalRPM is only an RPM by the fact that that is the units of the PID. As the PID units can be anything, change this to minThermalOutput to
s/minThermalRPM/minThermalOutput The minThermalRPM is only an RPM by the fact that that is the units of the PID. As the PID units can be anything, change this to minThermalOutput to allow for different units (i.e. percent). Change-Id: Ic53fef1159ade5a413e5d519d407947f3023d8e3 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
8e2fdb34 |
| 11-Feb-2019 |
Patrick Venture <venture@google.com> |
conf change: rename zone variables Rename the zone variables to make them camelCase as a step towards making all configuration variables camelCase for consistency. Note: This pa
conf change: rename zone variables Rename the zone variables to make them camelCase as a step towards making all configuration variables camelCase for consistency. Note: This patchset requires a change to your yaml configuration if you're using it, or libconfig if you're using it. Change-Id: If9cf1d7eb8227d305a1625275f2f7082c0d6905a Signed-off-by: Patrick Venture <venture@google.com>
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 ...
|
#
0bbeaf84 |
| 30-Oct-2018 |
Patrick Venture <venture@google.com> |
style: s/getZoneId/getZoneID/g Acronyms are meant to be in the same case within their part of the camel case name. Change-Id: I9e55d4419617a35b0f3a85f3d55543c8fc9bd76f Signe
style: s/getZoneId/getZoneID/g Acronyms are meant to be in the same case within their part of the camel case name. Change-Id: I9e55d4419617a35b0f3a85f3d55543c8fc9bd76f 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 ...
|