Skip to content

Test to verify numa balancing by verifying numa_pte_updates and numa_hint_faults#3061

Merged
Naresh-ibm merged 2 commits intoavocado-framework-tests:masterfrom
Pavithra1602:auto_numa
Mar 9, 2026
Merged

Test to verify numa balancing by verifying numa_pte_updates and numa_hint_faults#3061
Naresh-ibm merged 2 commits intoavocado-framework-tests:masterfrom
Pavithra1602:auto_numa

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 <pavrampu@linux.ibm.com>
@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

@Naresh-ibm
Copy link
Collaborator

@Pavithra1602 please add the runs logs from all linux variants (RHEL, SLES15X, SLES16)

…hint_faults v3

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 <pavrampu@linux.ibm.com>
@Pavithra1602
Copy link
Contributor Author

SLES:

ltcden10-lp12:/home/avocado-fvt-wrapper/tests/avocado-misc-tests/memory # avocado run --max-parallel-tasks=1 autonuma.py
Fetching asset from autonuma.py:AutoNuma.test
Fetching asset from autonuma.py:AutoNuma.test_autonuma_benchmark
Fetching asset from autonuma.py:AutoNuma.test_autonuma_benchmark
JOB ID : fad4fd7491f4c3def2337c2efb1b3865423939c7
JOB LOG : /home/avocado-fvt-wrapper/results/job-2026-03-08T14.44-fad4fd7/job.log
(1/2) autonuma.py:AutoNuma.test: STARTED
(1/2) autonuma.py:AutoNuma.test: PASS (21.66 s)
(2/2) autonuma.py:AutoNuma.test_autonuma_benchmark: STARTED
(2/2) autonuma.py:AutoNuma.test_autonuma_benchmark: WARN: Test passed but there were warnings during execution. Check the log for details. (1314.79 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 1 | INTERRUPT 0 | CANCEL 0
JOB HTML : /home/avocado-fvt-wrapper/results/job-2026-03-08T14.44-fad4fd7/results.html
JOB TIME : 1354.67 s
ltcden10-lp12:/home/avocado-fvt-wrapper/tests/avocado-misc-tests/memory #

RHEL:

avocado run --max-parallel-tasks=1 autonuma.py

Fetching asset from autonuma.py:AutoNuma.test
Fetching asset from autonuma.py:AutoNuma.test_autonuma_benchmark
Fetching asset from autonuma.py:AutoNuma.test_autonuma_benchmark
JOB ID : 90ef83fbed021a695946a8d80917449283006042
JOB LOG : /home/avocado-fvt-wrapper/results/job-2026-03-08T19.51-90ef83f/job.log
(1/2) autonuma.py:AutoNuma.test: STARTED
(1/2) autonuma.py:AutoNuma.test: PASS (21.46 s)
(2/2) autonuma.py:AutoNuma.test_autonuma_benchmark: STARTED
[1725625.978251] numa02[47980]: segfault (11) at 80002d9f0010 nip 7fffadad8b58 lr 10000748 code 1 in libc.so.6[7fffada00000+220000]
[1725625.978289] numa02[47980]: code: 7d60581e 7ca85851 7ca0281e 7c095b1b 7c0a2b1b 4e800020 7c0600d0 78000661
[1725625.978295] numa02[47980]: code: 41820048 7ca02850 7c102120 40990018 f406001d f406002d f406003d
[1725626.118255] numa02_SMT[48010]: segfault (11) at 80001e7f0010 nip 7fff9e8d8b58 lr 10000748 code 1 in libc.so.6[7fff9e800000+220000]
[1725626.118285] numa02_SMT[48010]: code: 7d60581e 7ca85851 7ca0281e 7c095b1b 7c0a2b1b 4e800020 7c0600d0 78000661
[1725626.118290] numa02_SMT[48010]: code: 41820048 7ca02850 7c102120 40990018 f406001d f406002d f406003d
(2/2) autonuma.py:AutoNuma.test_autonuma_benchmark: WARN: Test passed but there were warnings during execution. Check the log for details. (2.29 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 1 | INTERRUPT 0 | CANCEL 0
JOB HTML : /home/avocado-fvt-wrapper/results/job-2026-03-08T19.51-90ef83f/results.html
JOB TIME : 45.22 s
[root@ltcever87-lp1 memory]#

Copy link
Collaborator

@Naresh-ibm Naresh-ibm left a comment

Choose a reason for hiding this comment

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

@Pavithra1602 Thank for the PR
LGTM

@Naresh-ibm Naresh-ibm merged commit f3879dd into avocado-framework-tests:master Mar 9, 2026
5 checks passed
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