Skip to content

Conversation

@Pavithra1602
Copy link
Contributor

Test enables and disables numa_balancing by writing to /proc/sys/kernel/numa_balancing and verifies numa_pte_updates and numa_hint_faults

…hint_faults

Test enables and disables numa_balancing by writing to /proc/sys/kernel/numa_balancing and verifies numa_pte_updates and numa_hint_faults

Signed-off-by: Pavithra <[email protected]>
@Naresh-ibm Naresh-ibm self-assigned this Oct 27, 2025
"""
cmd = 'cat /proc/vmstat | grep numa_pte_updates'
output = process.system_output(cmd, shell=True)
return(int(str(output).split()[1].strip('\'')))
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Pavithra1602 I think better to use [-1] and why strip(''')? we have only space character i feel

# cat /proc/vmstat  | grep numa_pte_updates
numa_pte_updates 94736

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am getting an extra ' if we are not using strip()

[stdout] b'numa_pte_updates 3978'
[stdout]
[stdout] 3978'

"""
cmd = 'cat /proc/vmstat | grep numa_hint_faults | head -1'
output = process.system_output(cmd, shell=True)
return(int(str(output).split()[1].strip('\'')))
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here, better use split()[-1]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same here getting an extra ' if strip is not used.

Copy link
Collaborator

Choose a reason for hiding this comment

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

can you give a try if .decode() or .stdout_text can help here?
like below
output = process.run(cmd, ignore_status=True, sudo=True, shell=True).stdout_text
or
out = process.run(cmd, ignore_status=True, sudo=True, shell=True).decode()

if not smm.check_installed(packages) and not smm.install(packages):
self.cancel('%s is needed for the test to be run' % packages)

self.url = 'https://sourceforge.net/projects/ebizzy/files/ebizzy/0.3/ebizzy-0.3.tar.gz'
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Pavithra1602 can you please move this as yaml parameter?

This test case runs downloading, extracting, and running the autonuma-benchmark tests,
Test results need to be verified manually.
"""
url_autonuma = 'https://github.com/pholasek/autonuma-benchmark/archive/refs/heads/master.zip'
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Pavithra1602 move this to yaml please

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 sending an updated patch

self.sourcedir = os.path.join(self.workdir, "autonuma-benchmark-master")
os.chdir(self.sourcedir)
process.system_output('./start_bench.sh -A', shell=True, ignore_status=True)
self.log.warn("Have run the tests please review the results in debug.log")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why log.warn?

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 test just runs the bench mark test, need to analyse the values manually, so adding warn else we may miss analyzing the output values.

…hint_faults v2

Test enables and disables numa_balancing by writing to /proc/sys/kernel/numa_balancing and verifies numa_pte_updates and numa_hint_faults

Signed-off-by: Pavithra <[email protected]>
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