open-power / op-test

Testing Firmware for OpenPOWER systems
Apache License 2.0
37 stars 85 forks source link

Fixed the issue for seating the shared mode EC vs VP value. #866

Closed SamirMulani closed 2 months ago

SamirMulani commented 2 months ago

Fix EC Min/Desired Proc Units Calculation and Max Virtual Proc Units Logic

Previously, for EC, the min_proc_units were calculated by multiplying the user input with the overcommit_ratio. This caused an issue where users were unable to set their desired min_proc_units for EC. To fix this, the overcommit_ratio is no longer used in calculating desired_proc_units, as it should only be applied when determining the virtual proc units. The desired_proc_units, max_proc_units and min_proc_units are now set directly based on the user's inputs for EC.

Additionally, we added logic to calculate the max virtual proc units by fetching the maximum virtual procs configured in the system. We use this value as the max virtual proc count, but there is a condition where the available stealable resource count (multiplied by 2) is compared against the max virtual procs. If the multiplied stealable count is greater than the actual max virtual procs retrieved from the HMC command, we use the higher value, otherwise, we proceed with 2 * int(max_proc_units) for EC.

PraveenPenguin commented 2 months ago

@SamirMulani please push other changes as well so it has logically conclusion