From ef9f384959db264aa62eace99df94bb3bfd7cffd Mon Sep 17 00:00:00 2001 From: Samir Mulani Date: Thu, 26 Sep 2024 13:05:05 +0530 Subject: [PATCH] Added support to take max_proc_units as input from user. In the previous implementation, we did not support taking the max_proc_units value from user input. Instead, we first calculated the stealable resources and used that value, with a default setting of max_proc_units=2. Now, we have added the ability to take max_proc_units as input from a configuration file. If the user does not provide this value, we fall back to the stealable resource count. Signed-off-by: Samir Mulani --- testcases/MachineConfig.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testcases/MachineConfig.py b/testcases/MachineConfig.py index 362f9baa..4dfe35ab 100755 --- a/testcases/MachineConfig.py +++ b/testcases/MachineConfig.py @@ -250,10 +250,9 @@ def LparSetup(self, lpar_config=""): except AttributeError: self.desired_proc_units = 2.0 try: - self.max_proc_units = int(float( - self.cv_HMC.get_available_proc_resources()[0])) + self.cv_HMC.get_stealable_proc_resources_lpar() + self.max_proc_units = float(conf.args.max_proc_units) except AttributeError: - self.max_proc_units = 2.0 + self.max_proc_units = int(float(self.cv_HMC.get_available_proc_resources()[0])) + self.cv_HMC.get_stealable_proc_resources_lpar() try: self.overcommit_ratio = int(conf.args.overcommit_ratio) except AttributeError: