Re: [PATCH v3 0/2] Fixup for discontiguous/sparse numa nodes
From: Satheesh Rajendran
Date: Tue Sep 19 2017 - 05:35:04 EST
HiÂArnaldo,
Please let me know if any further comments.
Thanks in advance :-)
Regards,
-Satheesh.On Mon, 2017-08-21 at 15:45 +0530, sathnaga@xxxxxxxxxxxxxxxxxx wrote:
> From: Satheesh Rajendran <sathnaga@xxxxxxxxxxxxxxxxxx>
>
> Certain systems would have sparse/discontinguous
> numa nodes.
> perf bench numa doesnt work well on such nodes.
> 1. It shows wrong values.
> 2. It can hang.
> 3. It can show redundant information for non-existant nodes.
>
> Â#numactl -H
> available: 2 nodes (0,8)
> node 0 cpus: 0 1 2 3 4 5 6 7
> node 0 size: 61352 MB
> node 0 free: 57168 MB
> node 8 cpus: 8 9 10 11 12 13 14 15
> node 8 size: 65416 MB
> node 8 free: 36593 MB
> node distances:
> nodeÂÂÂ0ÂÂÂ8
> Â 0:ÂÂ10ÂÂ40
> Â 8:ÂÂ40ÂÂ10
>
> Scenario 1:
>
> Before Fix:
> Â# perf bench numa mem --no-data_rand_walk -p 2 -t 20 -G 0 -P 3072 -T
> 0 -l 50 -c -s 1000
> ...
> ...
> Â# 40 tasks will execute (on 9 nodes, 16 CPUs): ----> Wrong number of
> nodes
> ...
> Â#ÂÂÂÂ2.0%ÂÂ[0.2
> mins]ÂÂ1/1ÂÂÂ0/0ÂÂÂ0/0ÂÂÂ0/0ÂÂÂ0/0ÂÂÂ0/0ÂÂÂ0/0ÂÂÂ0/0ÂÂÂ4/1ÂÂ[ 4/2 ]
> l:ÂÂ0-0ÂÂÂ(ÂÂ0) ----> Shows info on non-existant nodes.
>
> After Fix:
> Â# ./perf bench numa mem --no-data_rand_walk -p 2 -t 20 -G 0 -P 3072
> -T 0 -l 50 -c -s 1000
> ...
> ...
> Â# 40 tasks will execute (on 2 nodes, 16 CPUs):
> ...Â
> Â#ÂÂÂÂ2.0%ÂÂ[0.2 mins]ÂÂ9/1ÂÂÂ0/0ÂÂ[ 9/1 ] l:ÂÂ0-0ÂÂÂ(ÂÂ0)
> Â#ÂÂÂÂ4.0%ÂÂ[0.4 mins] 21/2ÂÂ19/1ÂÂ[ 2/3 ] l:ÂÂ0-1ÂÂÂ(ÂÂ1) {1-2}
>
> Scenario 2:
>
> Before Fix:
> Â# perf bench numa all
> Â# Running numa/mem benchmark...
> ....
> ...
> Â# Running RAM-bw-remote, "perf bench numa mem -p 1 -t 1 -P 1024 -C 0
> -M 1 -s 20 -zZq --thpÂÂ1 --no-data_rand_walk"
> perf: bench/numa.c:306: bind_to_memnode: Assertion `!(ret)' failed.
> ------------> Got hung
>
> After Fix:
> Â# ./perf bench numa all
> Â# Running numa/mem benchmark...
> ....
> ...
> Â# Running RAM-bw-remote, "perf bench numa mem -p 1 -t 1 -P 1024 -C 0
> -M 1 -s 20 -zZq --thpÂÂ1 --no-data_rand_walk"
>
> Â# NOTE: ignoring bind NODEs starting at NODE#1
> Â# NOTE: 0 tasks mem-bound, 1 tasks unbound
> ÂÂÂÂÂÂÂÂÂ20.017 secs slowest (max) thread-runtime
> ÂÂÂÂÂÂÂÂÂ20.000 secs fastest (min) thread-runtime
> ÂÂÂÂÂÂÂÂÂ20.006 secs average thread-runtime
> ÂÂÂÂÂÂÂÂÂÂ0.043 % difference between max/avg runtime
> ÂÂÂÂÂÂÂÂ413.794 GB data processed, per thread
> ÂÂÂÂÂÂÂÂ413.794 GB data processed, total
> ÂÂÂÂÂÂÂÂÂÂ0.048 nsecs/byte/thread runtime
> ÂÂÂÂÂÂÂÂÂ20.672 GB/sec/thread speed
> ÂÂÂÂÂÂÂÂÂ20.672 GB/sec total speed
>
> Changes in v2:
> Fixed review comments for function names and alloc failure handle
>
> Changes in v3:
> Coding Style fixes.
>
>
> Satheesh Rajendran (2):
> Â perf/bench/numa: Add functions to detect sparse numa nodes
> Â perf/bench/numa: Handle discontiguous/sparse numa nodes
>
> Âtools/perf/bench/numa.c | 61
> +++++++++++++++++++++++++++++++++++++++++++------
> Â1 file changed, 54 insertions(+), 7 deletions(-)
>