ltp/numa: reconstruct these testcases
PATCH v2 3/4 ltp/numa: reconstruct these testcases
These case occasionally failed on RHEL platform:
numa02 2 TFAIL : ltpapicmd.c:200: Test #2: NUMA hit and othernode increase in node0 is less than expected numa03 3 TFAIL : ltpapicmd.c:200: Test #3: NUMA interleave hit in node0 is less than expected numa08 8 TFAIL : ltpapicmd.c:200: Test #8: NUMA interleave hit in node0 is less than expected
From git log (commit e439df0ea74231), it says "In RHEL collection of istics take more time", and add sleep 2s in the case. I looked into the detail and found that's reasonable, numastat growing slowly on RHEL system, therefore tests failed with numastate update uncompleted. Despite all that, sleeping 2 sec still working bad during my test.
In this patch, reconstruct the whole tests in a new method which detect numa statistics more precisely by command 'numastat -p $pid'.
The worth to say, I take use of Cyril's proposal to add a few lines of code to the numa helper so that it can test the share memory just like the command blow does:
numactl --length=1M --file /dev/shm/numa_shm --interleave=all --touch
And, the orignal test7() has been removed, replaced by a new test for share memory allocated on preferred numa node(see: test3).
--- testcases/kernel/numa/README | 17 +- testcases/kernel/numa/numa01.sh | 450 ++++++++++++----------------------- testcases/kernel/numa/support_numa.c | 51 +++- 3 files changed, 210 insertions(+), 308 deletions(-)
testcases/kernel/numa/README +8 -9
@@ -26,24 +26,23 @@ Verifies the preferred node memory policy which will allocate memory from the no testcase will use the support_numa process for the verfication. TestCase3: -Verifies the memory interleaving policy which will distribute the memory evenly among all nodes. This +Verifies the preferred node memory policy which will allocate shared memory from the node we specify. This testcase will use the support_numa process for the verfication. TestCase4: -Verifies the physical cpu affinity which runs the process support_numa on the specified physical cpu number. +Verifies the memory interleaving policy which will distribute the memory evenly among all nodes. This +testcase will use the support_numa process for the verfication. TestCase5: -Verifies the local allocation policy which always allocates memory from the local node. This testcase -will use the support_numa process for the verfication. +Verifies the memory interleaving policy which will distribute the memory evenly among all nodes. This +testcase will use the support_numa process for the verfication. TestCase6: -Verifies the memory interleaving policy on the shared memory which will interleave the shared memory on -all nodes equally. Here, the testcase use touch command instead of running a seperate process to verify -the policy applied. +Verifies the physical cpu affinity which runs the process support_numa on the specified physical cpu number. TestCase7: -Verifies the memory interleaving policy which will distribute the memory evenly among all nodes. This -testcase will use the numademo for the verfication. +Verifies the local allocation policy which always allocates memory from the local node. This testcase +will use the support_numa process for the verfication. TestCase8: Verifies the memory interleaving policy which will distribute the memory evenly among all nodes. This
testcases/kernel/numa/numa01.sh +157 -293
606 lines not on this page · raw message
testcases/kernel/numa/support_numa.c +45 -6
91 lines not on this page · raw message
Signature · 1 line
1.8.3.1