#
68a24c9e |
| 25-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
resolve stricter warnings
In order to convert this repository to Meson, we need to make it compile under `warning_level=3`. Fix a number of warning classes across the repository or disable them.
S
resolve stricter warnings
In order to convert this repository to Meson, we need to make it compile under `warning_level=3`. Fix a number of warning classes across the repository or disable them.
Some fixes are:
* Add missing header files. * Fully initialize structs as necessary. * Add `__attribute__((unused))` on parameters as necessary. * Fix comparisons between signed and unsigned. * Fix printf specifiers as necessary. * Avoid case-fallthrough. * Remove if conditions which are always true.
Some warnings would require extensive code changes, due to their pervasive use, and so are disabled at a per-file level: * `-Wpointer-arith` * `-Wunused-result`
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If8992b9108f12b39f796ed090ba29868c9f3c627
show more ...
|
#
fac3689e |
| 17-May-2019 |
Andrew Jeffery <andrew@aj.id.au> |
dbus: Unref replies to avoid leaks
Testing showed that failing to free DBus message replies was leaking 800-900kiB per boot. After adding the appropriate unrefs, mboxd memory consumption stayed stab
dbus: Unref replies to avoid leaks
Testing showed that failing to free DBus message replies was leaking 800-900kiB per boot. After adding the appropriate unrefs, mboxd memory consumption stayed stable at 71920kiB across multiple reboots of the host.
The root cause was identified using a DBus capture of the host's IPMI traffic during boot, then reducing the output to mboxd-specific messages and turning them into commands that could be run with ipmitool. Adding all of these commands to a script and running `pmap` between ipmitool invocations showed the growth in memory usage across the "boot" process, but this did not correlate with any particular set of commands to mboxd. The lack of correlation lead to the hypothesis that we might be able to reproduce by sending a lot of dbus messages, such as:
``` root@witherspoon:/tmp# for i in `seq 1 10000`; do \ busctl call xyz.openbmc_project.Hiomapd \ /xyz/openbmc_project/Hiomapd \ xyz.openbmc_project.Hiomapd.Protocol.V2 \ GetInfo y 2; \ done ```
Spamming the daemon in this way demonstrated the growth in memory seen during a regular boot process, confirming that just sending DBus messages was enough.
Add the necessary unrefs for the replies at the end of each method handler to ensure the replies are appropriately freed.
Testing and confirmation of the fix were performed on a Witherspoon system.
Change-Id: If5fe7576aaca1be617181526bf64511ccee1dd9f Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
e7d26ccc |
| 17-Mar-2019 |
Andrew Jeffery <andrew@aj.id.au> |
control: dbus: Remove unnecessary vpnor header dependency
Change-Id: I334bdf6086ec376c1d83c48756dc8c56fe521a4b Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
#
5320f6e0 |
| 14-Mar-2019 |
Andrew Jeffery <andrew@aj.id.au> |
mboxd: Add backend DBus interface and commandline options
Also implement a backend commandline option to mboxctl: `mboxctl --backend ...`, to allow easy run-time switching of the backend from the co
mboxd: Add backend DBus interface and commandline options
Also implement a backend commandline option to mboxctl: `mboxctl --backend ...`, to allow easy run-time switching of the backend from the commandline.
Switching between VPNOR and file backends via mboxctl was tested on Witherspoon, and MTD and file backends on Romulus.
Change-Id: Iaf0e27ecf1d5cdd9e3a31729fb179096bbc37408 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
26558dbb |
| 09-Aug-2018 |
Andrew Jeffery <andrew@aj.id.au> |
mboxd: Refactor and rename mbox.h to mboxd.h
Refine the purpose of the header file to represent what's required for the daemon itself, not its constituent pieces. Rather, split those definitions out
mboxd: Refactor and rename mbox.h to mboxd.h
Refine the purpose of the header file to represent what's required for the daemon itself, not its constituent pieces. Rather, split those definitions out to their respective header files and include them as necessary.
Finally the header file is renamed to better reflect its purpose.
Change-Id: I48c409f57d96c844589cd865b24f197477dfe87c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
55f4d6f9 |
| 05-Aug-2018 |
Andrew Jeffery <andrew@aj.id.au> |
dbus: Use new bus name, object and interface
The new interface is a more typical use of DBus, exposing multiple methods for the functions that are available on the object. The legacy interface by co
dbus: Use new bus name, object and interface
The new interface is a more typical use of DBus, exposing multiple methods for the functions that are available on the object. The legacy interface by comparison exposed only one method whose arguments selected sub-commands to be executed. The legacy approach is not terribly discoverable and leads to a lack of clarity in the client code. The legacy approach also obscured the implementation with its use of `struct mbox_dbus_msg`. The new interface wraps around the existing helpers and so also deals with `struct mbox_dbus_msg`, but this can at least be removed in the future.
Change-Id: I7113ed8fd2324bf3fb049d8d20acb3fd7fba6de3 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|