Skip to content

Commit 4a7c667

Browse files
committed
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 <[email protected]>
1 parent 7981ab5 commit 4a7c667

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

common/OpTestHMC.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,13 @@ def change_proc_mode(self, proc_mode, sharing_mode, min_proc_units, desired_proc
424424
max_virtual_proc = self.run_command("lshwres -m %s -r proc --level sys -F curr_sys_virtual_procs" % (self.mg_system))
425425
max_virtual_proc = int(max_virtual_proc[0])
426426
if overcommit_ratio*int(max_proc_units) > max_virtual_proc:
427-
v_max_proc = max_virtual_proc
428-
else:
427+
v_max_proc = max_virtual_proc
428+
else:
429429
v_max_proc = overcommit_ratio*int(max_proc_units)
430430

431+
if max_proc_units > v_max_proc:
432+
max_proc_units = v_max_proc
433+
431434
self.set_lpar_cfg("proc_mode=shared,sharing_mode=%s,min_proc_units=%s,max_proc_units=%s,"
432435
"desired_proc_units=%s,min_procs=%s,desired_procs=%s,max_procs=%s,"
433436
"min_mem=%s,desired_mem=%s,max_mem=%s" %

0 commit comments

Comments
 (0)