History log of /openbmc/phosphor-pid-control/main.cpp (Results 26 – 50 of 65)
Revision Date Author Comments
# 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 ...


# 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
the extra stru

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


# 7382318f 08-Oct-2020 Patrick Venture <venture@google.com>

dbus: parameterize dbusconfiguration init

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


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

main: Allowing logging and tuning to also be enabled by files

The logging and tuning flags, which come from the command line,
are now also able to be enabled by the presence of certain files.

This

main: Allowing logging and tuning to also be enabled by files

The logging and tuning flags, which come from the command line,
are now also able to be enabled by the presence of certain files.

This allows the logging and tuning features to be enabled,
at runtime, without having to change the command line.

The content of /etc/thermal.d/tuning does not matter,
only the existence of this file is checked for.
The content of /etc/thermal.d/logging can optionally
be a directory path, which will be used if it exists,
otherwise use the systemwide default temporary directory.

This makes it easy for people doing thermal calibration
to enable these options as they need, without having to
destabilize the system by hand-editing the systemd configuration,
which is non-trivial to change at runtime, due to systemd caching.

The directory choice of /etc/thermal.d has precedence,
as it was already hardcoded in the setpoint file during tuning.

Tested: Tuning mode was enabled and logging appeared in /tmp
mkdir -p /etc/thermal.d
touch /etc/thermal.d/logging
touch /etc/thermal.d/tuning
killall swampd

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

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 is
done wit

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


# 7f9d690d 10-Sep-2020 Patrick Venture <venture@google.com>

transition dbus-configuration to run-time check

This now checks dbus if there is no json file configuration found.

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

transition dbus-configuration to run-time check

This now checks dbus if there is no json file configuration found.

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

show more ...


# 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 unimportant provid

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

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


# d4695590 17-May-2019 Kun Yi <kunyi731@gmail.com>

main: fix loggingEnabled checking

loggingPath is not populated after args are parsed.
Tested: with -l, swampd correctly generated logs

Resolves: openbmc/phosphor-pid-control#12
Signed-off-by: Kun Y

main: fix loggingEnabled checking

loggingPath is not populated after args are parsed.
Tested: with -l, swampd correctly generated logs

Resolves: openbmc/phosphor-pid-control#12
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: Ic103879f6b65d4e89c49e8d9700c5d71b9549f4d

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


# 89002dbd 08-May-2019 Patrick Venture <venture@google.com>

explicitly expect a directory for logging

Verify the logging parameter is explicitly a directory. Treat the path
as a directory for creating the logging files.

Signed-off-by: Patrick Venture <vent

explicitly expect a directory for logging

Verify the logging parameter is explicitly a directory. Treat the path
as a directory for creating the logging files.

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

show more ...


# de79ee05 08-May-2019 Patrick Venture <venture@google.com>

split parameters for logging and tuning

add a flag to enable/disable tuning: default off
add an option for specifying a folder for outputting logs.

Closes: #10
Signed-off-by: Patrick Venture <ventu

split parameters for logging and tuning

add a flag to enable/disable tuning: default off
add an option for specifying a folder for outputting logs.

Closes: #10
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I43864768f1dee8672f13288d3cf5a0c87c373aed

show more ...


# a3cac537 08-May-2019 Patrick Venture <venture@google.com>

main: drop log file path check

Remove check that the log file path exists.

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


# ce6a3f36 12-Mar-2019 James Feist <james.feist@linux.intel.com>

Remove threads

This converts phosphor-pid-control into an async
single threaded application. The reason for doing this
is on our systems phosphor-pid-control had the largest
VSZ when viewed under to

Remove threads

This converts phosphor-pid-control into an async
single threaded application. The reason for doing this
is on our systems phosphor-pid-control had the largest
VSZ when viewed under top. Before this patch the VSZ
was at 50720, after it is at 7760.

Tested-by: Could still interact with all interfaces
under rest-dbus and sensor override worked to ramp fans
when changing cpu temps.

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

show more ...


# b5cc37ce 11-Mar-2019 Patrick Venture <venture@google.com>

swap out getopts for cli11

Swap out getopt for cli11 for parsing parameters.

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


# c32e3fc5 28-Feb-2019 Patrick Venture <venture@google.com>

add tuning enable variable

Add a variable that when set, enables tuning logging. This variable is
set to false.

Tuning can be enabled via "-t" "--tuning" on the command line.
With a parameter is t

add tuning enable variable

Add a variable that when set, enables tuning logging. This variable is
set to false.

Tuning can be enabled via "-t" "--tuning" on the command line.
With a parameter is the path where to write the logging information.

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

show more ...


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

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


# 18b1311e 14-Feb-2019 Patrick Venture <venture@google.com>

build: drop support for YAML configurations

phosphor-pid-control now only supports json configurations and no longer
builds from a YAML configuration.

Change-Id: I25fa7766399a1345dca89aac20e7b49caa

build: drop support for YAML configurations

phosphor-pid-control now only supports json configurations and no longer
builds from a YAML configuration.

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

show more ...


# 4cb7c058 14-Feb-2019 Patrick Venture <venture@google.com>

main: if json configuration, override yaml built

Override the yaml built objects if there is a configuration file.

Change-Id: Id7b21fa171f5f133b2d888b4095047551b3d65b9
Signed-off-by: Patrick Ventur

main: if json configuration, override yaml built

Override the yaml built objects if there is a configuration file.

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

show more ...


# c19f5d4d 14-Feb-2019 Patrick Venture <venture@google.com>

main: add json configuration path

If swampd is compiled to check for its configuration at run-time, it
will check one specific path.

Change-Id: I5c37ccbb2229db742c0f43b3d9ee0c368df19479
Signed-off-

main: add json configuration path

If swampd is compiled to check for its configuration at run-time, it
will check one specific path.

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

show more ...


# ba8ffa73 11-Feb-2019 Patrick Venture <venture@google.com>

swap libconfig++ for json in configuration parsing

Parse the configuration file as json and not libconfig++.

Change-Id: Ic3e71cc810195387617b545566cf757c61c71942
Signed-off-by: Patrick Venture <ven

swap libconfig++ for json in configuration parsing

Parse the configuration file as json and not libconfig++.

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

show more ...


# 9fa90c19 11-Jan-2019 James Feist <james.feist@linux.intel.com>

Change all default_bus back to new_system bus

new_default now returns a reference to a single bus,
phosphor-pid-control uses multiple busses so we do not
want that. This was the way it was implement

Change all default_bus back to new_system bus

new_default now returns a reference to a single bus,
phosphor-pid-control uses multiple busses so we do not
want that. This was the way it was implemented prior to
https://github.com/openbmc/sdbusplus/commit/8ca6025eed193c252149b2908c3d5e37b00b0107

Tested-by: swampd ran normally

These errors go away:

Jan 28 18:28:45 swampd[1760]: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
Jan 28 18:28:45 swampd[1760]: what(): sd_bus_request_name: org.freedesktop.DBus.Error.InconsistentMessage: Bad message

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

show more ...


123