From 035bb0968f2297d4bf2f9da9918ebc1f06be7d5e Mon Sep 17 00:00:00 2001 From: Samir Mulani Date: Thu, 16 Jan 2025 13:44:27 +0530 Subject: [PATCH 1/2] Fixed EC vs VP setting for shared mode LPAR configuration. In the previously added code, it was observed that when the condition max_proc_units > max_virtual_proc is true, the system assigns the maximum virtual processors as returned by the LPAR configuration. However, an issue arises when the LPAR returns a maximum virtual processor count that is less than the max_proc_units. In such cases, the HMC fails to configure the EC vs VP values according to the virtual processors' thumb rule, which mandates that virtual processors should always be greater than or equal to EC processors. This patch addresses and resolves the issue. Signed-off-by: Samir Mulani --- common/OpTestHMC.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/OpTestHMC.py b/common/OpTestHMC.py index ade1b077..d43fab33 100644 --- a/common/OpTestHMC.py +++ b/common/OpTestHMC.py @@ -423,10 +423,10 @@ def change_proc_mode(self, proc_mode, sharing_mode, min_proc_units, desired_proc v_max_proc = 0 max_virtual_proc = self.run_command("lshwres -m %s -r proc --level sys -F curr_sys_virtual_procs" % (self.mg_system)) max_virtual_proc = int(max_virtual_proc[0]) - if overcommit_ratio*int(max_proc_units) > max_virtual_proc: - v_max_proc = max_virtual_proc + if int(max_proc_units) > max_virtual_proc: + v_max_proc = int(max_proc_units) else: - v_max_proc = overcommit_ratio*int(max_proc_units) + v_max_proc = max_virtual_proc self.set_lpar_cfg("proc_mode=shared,sharing_mode=%s,min_proc_units=%s,max_proc_units=%s," "desired_proc_units=%s,min_procs=%s,desired_procs=%s,max_procs=%s," From f7dd00647784b2e879846e5113b5fe148f74afa9 Mon Sep 17 00:00:00 2001 From: Samir Mulani Date: Thu, 16 Jan 2025 13:57:55 +0530 Subject: [PATCH 2/2] Cancel test case if EC desired procs < VP max procs Added support to cancel the test case if desired EC procs are less than VP max procs. Signed-off-by: Samir Mulani --- common/OpTestHMC.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/OpTestHMC.py b/common/OpTestHMC.py index d43fab33..0d7e4586 100644 --- a/common/OpTestHMC.py +++ b/common/OpTestHMC.py @@ -428,6 +428,9 @@ def change_proc_mode(self, proc_mode, sharing_mode, min_proc_units, desired_proc else: v_max_proc = max_virtual_proc + if desired_proc_units < v_max_proc: + log.error("The test case is being canceled as we need to configure the system manually because desired_proc_units < v_max_proc.") + self.set_lpar_cfg("proc_mode=shared,sharing_mode=%s,min_proc_units=%s,max_proc_units=%s," "desired_proc_units=%s,min_procs=%s,desired_procs=%s,max_procs=%s," "min_mem=%s,desired_mem=%s,max_mem=%s" %