Skip to content

Commit 035bb09

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 035bb09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

common/OpTestHMC.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,10 @@ def change_proc_mode(self, proc_mode, sharing_mode, min_proc_units, desired_proc
423423
v_max_proc = 0
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])
426-
if overcommit_ratio*int(max_proc_units) > max_virtual_proc:
427-
v_max_proc = max_virtual_proc
426+
if int(max_proc_units) > max_virtual_proc:
427+
v_max_proc = int(max_proc_units)
428428
else:
429-
v_max_proc = overcommit_ratio*int(max_proc_units)
429+
v_max_proc = max_virtual_proc
430430

431431
self.set_lpar_cfg("proc_mode=shared,sharing_mode=%s,min_proc_units=%s,max_proc_units=%s,"
432432
"desired_proc_units=%s,min_procs=%s,desired_procs=%s,max_procs=%s,"

0 commit comments

Comments
 (0)