Skip to content

KVM: add low_mem_nxhp and high_mem_nxhp testcase#565

Open
atlarator wants to merge 1 commit intointel:mainfrom
atlarator:nxhp
Open

KVM: add low_mem_nxhp and high_mem_nxhp testcase#565
atlarator wants to merge 1 commit intointel:mainfrom
atlarator:nxhp

Conversation

@atlarator
Copy link
Contributor

No description provided.

if nxhp_value_new != "Y":
test.fail("Failed to enable NX huge page")
if is_high_mem_nxhp:
subprocess.run(f"stress-ng --vm {vcpus} --vm-bytes 16G --timeout 60s", shell=True, check=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Check if stress-ng is available/installed before running.
And do we need to align the stress-ng parameters with XVS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what is $Config in xvs? it seems that in xvs the command stress_ng_test is somehow an alias

Copy link
Contributor

Choose a reason for hiding this comment

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

In XVS, it is defined in Framework/VMMCommon.sh:3189:function stress_ng_test()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the framework is CentOS distro specific, right? Or why hard code to install stress-ng through yum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, it seems clear for me.

Copy link
Contributor

Choose a reason for hiding this comment

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

the framework is CentOS distro specific, right? Or why hard code to install stress-ng through yum?

XVS is for Centos now, but we'd better support both Centos and Ubuntu in LKVS.

@atlarator
Copy link
Contributor Author

The parameters may correct now, btw according to xvs I only enabled 2_cpus for nxhp cases.

test.fail("Unsupported distro, please install stress-ng manually")
if ret != 0:
test.fail("Failed to install stress-ng, please install manually")
ret = subprocess.run(f"stress-ng --cpu {vm_cpu} --io 1 --vm {vm_mem} --vm-bytes {mem_size} --hdd 1 --hdd-bytes 3G --timeout {time} > /tmp/stress_ng.log", shell=True, check=True).returncode
Copy link
Contributor

Choose a reason for hiding this comment

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

stress-ng should be executed in VM, not host, you can refer to other cases in LKVS/KVM for consistent code style.
BTW, for host, we have "process" from avocado.utils.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

only this one? what about installing and nx_hugepage configuration reading?

Copy link
Contributor

Choose a reason for hiding this comment

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

stress-ng installing is also in VM, nx hugepage configuration is on host. Just follow the case in XVS.

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