-
Notifications
You must be signed in to change notification settings - Fork 20
Remove redundant async call in FRU collection threads #588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1110_Dev
Are you sure you want to change the base?
Remove redundant async call in FRU collection threads #588
Conversation
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. Test: ``` 1. Install bitbaked image on Everest (ever6bmc) 2. After initial boot, check: - BMC State Ready - vpd-manager's CollectionStatus property should be "Completed" busctl get-property com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager CollectionStatus s "Completed" - vpd-manager status should be running with no restarts - vpd-manager should have only 1 thread running: check "ls -la /proc/<vpd-manager PID>/task 3. Reboot the BMC several times and repeat Step 2. ``` Change-Id: I603c64dc9b5057429a2288f0edfde6086755b851 Signed-off-by: Souvik Roy <[email protected]>
1b81cd1
to
6c2ea1a
Compare
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. Test: ``` 1. Install bitbaked image on Everest (ever6bmc) 2. After initial boot, check: - BMC State Ready - vpd-manager's CollectionStatus property should be "Completed" busctl get-property com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager CollectionStatus s "Completed" - vpd-manager status should be running with no restarts - vpd-manager should have only 1 thread running: check "ls -la /proc/<vpd-manager PID>/task" 3. Reboot the BMC several times and repeat Step 2. ``` Change-Id: I603c64dc9b5057429a2288f0edfde6086755b851 Signed-off-by: Souvik Roy <[email protected]>
6c2ea1a
to
c7cc559
Compare
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 addresses issue ibm-openbmc#558. Test: ``` 1. Install bitbaked image on Everest (ever6bmc) 2. After initial boot, check: - BMC State Ready - vpd-manager's CollectionStatus property should be "Completed" busctl get-property com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager CollectionStatus s "Completed" - vpd-manager status should be running with no restarts - vpd-manager should have only 1 thread running: check "ls -la /proc/<vpd-manager PID>/task" 3. Reboot the BMC several times and repeat Step 2. ``` Change-Id: I603c64dc9b5057429a2288f0edfde6086755b851 Signed-off-by: Souvik Roy <[email protected]>
c7cc559
to
6a5fc3f
Compare
once collection is completed, there will be no thread running for parseAndPublishVPD. |
Yes, what I meant is there will be a single thread (the "main" thread) running for |
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 addresses issue ibm-openbmc#558. Test: ``` 1. Install bitbaked image on Everest (ever6bmc) 2. After initial boot, check: - BMC State Ready - vpd-manager's CollectionStatus property should be "Completed" busctl get-property com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager CollectionStatus s "Completed" - vpd-manager status should be running with no restarts - vpd-manager should have only 1 thread running: check "ls -la /proc/<vpd-manager PID>/task" 3. Reboot the BMC several times and repeat Step 2. ``` Change-Id: I603c64dc9b5057429a2288f0edfde6086755b851 Signed-off-by: Souvik Roy <[email protected]>
6a5fc3f
to
bf9dbbf
Compare
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. Incase launching detached thread for a FRU fails, we log a PEL and continue launching threads for other FRUs. This commit addresses issue ibm-openbmc#558. Test: ``` 1. Install bitbaked image on Everest (ever6bmc) 2. After initial boot, check: - BMC State Ready - vpd-manager's CollectionStatus property should be "Completed" busctl get-property com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager CollectionStatus s "Completed" - vpd-manager status should be running with no restarts - vpd-manager should have only 1 thread running: check "ls -la /proc/<vpd-manager PID>/task" 3. Reboot the BMC several times and repeat Step 2. ``` Change-Id: I603c64dc9b5057429a2288f0edfde6086755b851 Signed-off-by: Souvik Roy <[email protected]>
bf9dbbf
to
76c6b03
Compare
vpd-manager/src/worker.cpp
Outdated
{ | ||
// TODO: Should we re-try launching thread for this FRU? | ||
EventLogger::createSyncPel( | ||
types::ErrorType::InvalidVpdMessage, types::SeverityType::Alert, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does InvalidVpdMessage means?
vpd-manager/src/worker.cpp
Outdated
{ | ||
// TODO: Should we re-try launching thread for this FRU? | ||
EventLogger::createSyncPel( | ||
types::ErrorType::InvalidVpdMessage, types::SeverityType::Alert, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
little bit of brainstorming is required for types::SeverityType::Alert
Alert refers to - > should be corrected immediately https://github.com/ibm-openbmc/phosphor-dbus-interfaces/blob/1110/yaml/xyz/openbmc_project/Logging/Entry.interface.yaml#L78
-> why Alert is better here and why not Critical or error condition?
who we are alerting here? how will they correct the issue ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PriyangaRamasamy , we discussed this post scrum today and decided upon the following design:
Vpd-manager thread creation fails for a FRU:
- Create a list of FRUs for which thread failed
- Post collection of all FRUs, before setting state == COLLECTED,
- Trigger single FRU collection for all FRUs in failed list.
- Single FRU collection will log PEL if it again fails.
- Need to update Single FRU collection API to handle this case.
- Or create a separate API?
As part of this PR, we shall just create a list of FRUs for which thread creation failed, and create a Story for the remaining implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds like a plan 👍
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. Incase launching detached thread for a FRU fails, we log a PEL and continue launching threads for other FRUs. This commit addresses issue ibm-openbmc#558. Test: ``` 1. Install bitbaked image on Everest (ever6bmc) 2. After initial boot, check: - BMC State Ready - vpd-manager's CollectionStatus property should be "Completed" busctl get-property com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager CollectionStatus s "Completed" - vpd-manager status should be running with no restarts - vpd-manager should have only 1 thread running: check "ls -la /proc/<vpd-manager PID>/task" 3. Reboot the BMC several times and repeat Step 2. ``` Change-Id: I603c64dc9b5057429a2288f0edfde6086755b851 Signed-off-by: Souvik Roy <[email protected]>
76c6b03
to
3e7f583
Compare
This commit implements a list in Worker which holds the list of VPD file paths(EEPROM paths) for which collection thread creation has failed. After collection of all FRUs and before setting CollectionStatus as Completed, Manager needs to process this list. Note: Processing the list is a TODO. 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" ``` Change-Id: I472c54861f590167d8ec767ed6ddb3992c085b0f Signed-off-by: Souvik Roy <[email protected]>
3e7f583
to
bb9ac0a
Compare
This commit implements a list in Worker which holds the list of VPD file paths(EEPROM paths) for which collection thread creation has failed. After collection of all FRUs and before setting CollectionStatus as Completed, Manager needs to process this list. Note: Processing the list is a TODO. 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" ``` Change-Id: I472c54861f590167d8ec767ed6ddb3992c085b0f Signed-off-by: Souvik Roy <[email protected]>
bb9ac0a
to
c130ba4
Compare
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. Incase launching detached thread for a FRU fails, we log a PEL and continue launching threads for other FRUs. This commit addresses issue ibm-openbmc#558. Test: ``` 1. Install bitbaked image on Everest (ever6bmc) 2. After initial boot, check: - BMC State Ready - vpd-manager's CollectionStatus property should be "Completed" busctl get-property com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager CollectionStatus s "Completed" - vpd-manager status should be running with no restarts - vpd-manager should have only 1 thread running: check "ls -la /proc/<vpd-manager PID>/task" 3. Reboot the BMC several times and repeat Step 2. ``` Change-Id: I603c64dc9b5057429a2288f0edfde6086755b851 Signed-off-by: Souvik Roy <[email protected]>
This commit implements a list in Worker which holds the list of VPD file paths(EEPROM paths) for which collection thread creation has failed. After collection of all FRUs and before setting CollectionStatus as Completed, Manager needs to process this list. Note: Processing the list is a TODO. 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" ``` Change-Id: I472c54861f590167d8ec767ed6ddb3992c085b0f Signed-off-by: Souvik Roy <[email protected]>
c130ba4
to
d8dd7d9
Compare
This commit implements a list in Worker which holds the list of VPD file paths(EEPROM paths) for which collection thread creation has failed. After collection of all FRUs and before setting CollectionStatus as Completed, Manager needs to process this list. Note: Processing the list is a TODO. 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" ``` Change-Id: I472c54861f590167d8ec767ed6ddb3992c085b0f Signed-off-by: Souvik Roy <[email protected]>
d8dd7d9
to
21d578d
Compare
This commit implements a list in Worker which holds the list of VPD file paths(EEPROM paths) for which collection thread creation has failed. After collection of all FRUs and before setting CollectionStatus as Completed, Manager needs to process this list. Note: Processing the list is a TODO. 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" ``` Change-Id: I472c54861f590167d8ec767ed6ddb3992c085b0f Signed-off-by: Souvik Roy <[email protected]>
21d578d
to
1e18b81
Compare
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 addresses issue #558.
Test:
Change-Id: I603c64dc9b5057429a2288f0edfde6086755b851
Signed-off-by: Souvik Roy [email protected]