commit | 1f4c8f8123c0c08635367d2b279cef4fed3116b2 | [log] [tgz] |
---|---|---|
author | Souvik Roy <souvikroyofficial10@gmail.com> | Thu Jan 23 00:37:43 2025 -0600 |
committer | Souvik Roy <souvikroyofficial10@gmail.com> | Sun Feb 09 23:35:16 2025 -0600 |
tree | d1e6f2cf42734a1a804238e62a6005c7b9fdd202 | |
parent | bf257110c52db78488044853a4c032bbc1b05ca5 [diff] |
Remove redundant async call in collection threads This commit removes the redundant std:async call in the detached thread launched for parsing and publishing the VPD for an individual FRU. Since we have a dedicated detached thread for each FRU, we can do VPD parse and publish in a synchronous manner from the detached thread itself, instead of launching a asynchronous task which adds unnecessary performance cost. This commit also handles any exception thrown while launching the detached thread for a FRU. In case launching detached thread for a FRU fails, we add the EEPROM path of the FRU to a "failed EEPROM" list. This list can be handled by Manager later on. Test: ``` - Install bitbaked image on Everest system. - Check vpd-manager service status: root@p10bmc:~# systemctl show vpd-manager -p NRestarts NRestarts=0 - Check BMC reaches ready state: root@p10bmc:~# obmcutil state CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.On CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running BootProgress : xyz.openbmc_project.State.Boot.Progress. ProgressStages.OSRunning OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status. OSStatus.Inactive -Check CollectionStatus property of vpd-manager D-Bus service: root@p10bmc:~# busctl get-property com.ibm.VPD.Manager /com/ibm/VPD/ Manager com.ibm.VPD.Manager CollectionStatus s "Completed" - Check execution time change Measure the time between vpd-manager event loop start and CollectionStatus = Completed on a Everest system. Following figures were measured across 3 reboots: - On current code, (with the extra async call) it is 61 secs. - With the changes in this PR, it is 60.33 secs. ``` Change-Id: I86dd9f9f6a4c67b8159e4c90d6ffdb005568cf6b Signed-off-by: Souvik Roy <souvikroyofficial10@gmail.com>
This repository hosts code for OpenPower and IBM IPZ format VPD parsers. Both OpenPower VPD and IPZ VPD formats are structured binaries that consist of records and keywords. A record is a collection of multiple keywords. More information about the format can be found here.
The repository consists of two distinct applications, which are:
This is a build-time YAML driven application that parses the OpenPower VPD format and uses the YAML configuration (see extra-properties-example.yaml and writefru.yaml) to determine:
The application instance must be passed in the file path to the VPD (this can, for example, be a sysfs path exposed by the EEPROM device driver) and also the D-Bus object path(s) that EEPROM data needs to be published under.
This parser is can be built by passing in the --enable-ibm-parser
configure option. This parser differs from the OpenPower VPD parser in the following ways:
#
and are > 255 bytes in length).Making the application runtime JSON driven allows us to support multiple systems (with different FRU configurations) to be supported in a single code image as well as making the application more flexible for future improvements.