Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to get stealable resources from Not Activated lpars #847

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

shirishaganta1
Copy link
Contributor

CPU:Added support to get the procs assigned to not activated lpars and adding them to the max_procs of the target lpar along with the proc available from the CEC

Memory:Added support to get the memory assigned to not activated lpars and adding them to the max_memory of the target lpar along with memory available from the CEC

CPU:Added support to get the procs assigned to not activated lpars
and adding them to the max_procs of the target lpar along with
the proc available from the CEC

Memory:Added support to get the memory assigned to not activated
lpars and adding them to the max_memory of the target lpar
along with memory available from the CEC

Signed-off-by: Shirisha G <shirisha@linux.ibm.com>
@shirishaganta1
Copy link
Contributor Author

@@ -46,7 +46,7 @@
from common.OpTestSSH import OpTestSSH
from common.OpTestUtil import OpTestUtil
from common.Exceptions import CommandFailed
#from common.OpTestSystem import OpSystemState
# from common.OpTestSystem import OpSystemState
Copy link
Collaborator

@PraveenPenguin PraveenPenguin Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If module not used, Please remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure Praveen I will check if not needed will remove this

@@ -58,6 +58,7 @@
BOOTTIME = 500
STALLTIME = 5


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why empty line , i feel not needed

overcommit_ratio*int(min_proc_units), overcommit_ratio*int(desired_proc_units),
3*int(max_proc_units),min_memory, desired_memory, max_memory))
(sharing_mode, overcommit_ratio*int(min_proc_units), max_proc_units, overcommit_ratio*int(desired_proc_units),
int(min_proc_units), 2*int(desired_proc_units),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to changing in multiplier , is this hold good in all on majority of system

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes Praveen it works for all the systems.. Am making sure the ratio will be 1:2 in shared mode for PU:VP for desired and max proc units

"lssyscfg -r lpar -m %s -F name state" % self.mg_system)
# Split the output into lines
# lines = output.splitlines()
# Initialize an empty list to store the first column values
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove commented line and other places as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure will do that

for proc_value in proc:
stealable_procs.append(int(float(proc_value)))
total_stealable_proc = sum(stealable_procs)
print("total stealable proc:", total_stealable_proc)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use logger to print info and adopt in other places as well

We have some styling issues.So fixed them as well by running autopep8

Signed-off-by: Shirisha G <shirisha@linux.ibm.com>
@shirishaganta1
Copy link
Contributor Author

@PraveenPenguin addressed all the above comments

@PraveenPenguin
Copy link
Collaborator

@shirishaganta1 can you please post one run log and we are good to go

@shirishaganta1
Copy link
Contributor Author

@shirishaganta1 can you please post one run log and we are good to go

stealable-optest-log.txt

@shirishaganta1
Copy link
Contributor Author

@PraveenPenguin Done posted the run log.

@PraveenPenguin PraveenPenguin merged commit 1cb7606 into open-power:master Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants