Skip to content

Commit

Permalink
Modified a logic to calculate VP min and max value.
Browse files Browse the repository at this point in the history
Here we are planning to calculate the VP min and max based on the
overcommit ration. And that support we have added.

Signed-off-by: Samir Mulani <[email protected]>
  • Loading branch information
SamirMulani committed Oct 1, 2024
1 parent cd2e2aa commit 81aaeab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/OpTestHMC.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,16 +423,16 @@ 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 2*int(max_proc_units) > max_virtual_proc:
if overcommit_ratio*int(max_proc_units) > max_virtual_proc:
v_max_proc = max_virtual_proc
else:
v_max_proc = 2*int(max_proc_units)
v_max_proc = overcommit_ratio*int(max_proc_units)

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" %
(sharing_mode, min_proc_units, max_proc_units, desired_proc_units,
int(min_proc_units), overcommit_ratio*int(desired_proc_units), v_max_proc,
overcommit_ratio*int(min_proc_units), overcommit_ratio*int(desired_proc_units), v_max_proc,
min_memory, desired_memory, max_memory))
elif proc_mode == 'ded':
self.set_lpar_cfg("proc_mode=ded,sharing_mode=%s,min_procs=%s,max_procs=%s,desired_procs=%s,"
Expand Down

0 comments on commit 81aaeab

Please sign in to comment.