From: Michal Sojka Date: Sun, 19 Jan 2014 23:50:33 +0000 (+0100) Subject: New tests X-Git-Tag: fix-allnoconfig~64 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/6772d015e7e45a82ed1b0de3a930ad40a11d8079?hp=109b4b67cb54eadad6974f06cc68567c55d6acd4 New tests result: write() is the bottleneck --- diff --git a/ugw/data/bench-all.sh b/ugw/data/bench-all.sh index 8697bdc..e60a58b 100755 --- a/ugw/data/bench-all.sh +++ b/ugw/data/bench-all.sh @@ -19,7 +19,7 @@ while [ "${1#-}" != "$1" ]; do dirs=oneatatime.ftrace ;; -p) - dirs=($(seq 125 170)) + dirs=($(seq 125 160)) declare -a args for i in ${!dirs[*]}; do args[$i]=-p${dirs[$i]} @@ -33,7 +33,7 @@ while [ "${1#-}" != "$1" ]; do shift done -methods=${@:-rtems kernel read-write readnb-write mmap-write mmap-mmap mmapbusy-write mmapbusy-mmap readbusy-write} +methods=${@:-rtems kernel read-write readnb-write readnb-mmap mmap-write mmap-mmap mmapbusy-write mmapbusy-mmap readbusy-write} set -x for method in $methods; do @@ -42,6 +42,8 @@ for method in $methods; do kernel) ../ppc/boot -a kernelgw --exiton "Kernel GW started";; read-write) ../ppc/boot --exiton "UGW started";; readnb-write) ../ppc/boot -a "ugw=|-n|" --exiton "UGW started";; + readnb-mmap) ../ppc/boot -a "ugw=|-n -t mmap|" --exiton "UGW started";; + read-mmap) ../ppc/boot -a "ugw=|-t mmap|" --exiton "UGW started";; mmap-write) ../ppc/boot -a "ugw=|-r mmap|" --exiton "UGW started";; mmap-mmap) ../ppc/boot -a "ugw=|-r mmap -t mmap|" --exiton "UGW started";; mmapbusy-write) ../ppc/boot -a "ugw=|-r mmapbusy|" --exiton "UGW started";; @@ -57,7 +59,7 @@ for method in $methods; do arg=${args[$i]} dir=${dirs[$i]} set -x - ssh glab "latester -d can0 -d can1 -d can2 -c 10000 -q -n $method $arg" + ssh glab "latester -d can0 -d can1 -d can2 -c 3200 -q -n $method $arg" mkdir -p $dir scp glab:"$method-*.txt" $dir (cd $dir && ln -sf ../Makefile ../plot.gp ../preprocess.m .) diff --git a/ugw/data/plot-thr.gp b/ugw/data/plot-thr.gp index 2966efa..b3a4bd4 100755 --- a/ugw/data/plot-thr.gp +++ b/ugw/data/plot-thr.gp @@ -5,17 +5,20 @@ set ylabel "Latency [µs] + packet loss" set style data yerrorlines # set yrange [0:10000] set yrange [10:] +set ytics (1e1,2e1,5e1,1e2,2e2,5e2,1e3,2e3,5e3,1e4,2e4,5e4,1e5,2e5,5e5) set logscale y -# set key left Left reverse +set key reverse Left invert outside set grid loss_scale=10 -plot \ +plot [:160] \ 'kernel.dat' using 1:2:($3*loss_scale) title 'kernel', \ - 'mmapbusy-mmap.dat' using 1:2:($3*loss_scale) title 'mmapbusy-mmap', \ - 'mmapbusy-write.dat' using 1:2:($3*loss_scale) title 'mmapbusy-write', \ 'mmap-mmap.dat' using 1:2:($3*loss_scale) title 'mmap-mmap', \ + 'mmapbusy-mmap.dat' using 1:2:($3*loss_scale) title 'mmapbusy-mmap', \ 'mmap-write.dat' using 1:2:($3*loss_scale) title 'mmap-write', \ - 'readbusy-write.dat' using 1:2:($3*loss_scale) title 'readbusy-write', \ + 'mmapbusy-write.dat' using 1:2:($3*loss_scale) title 'mmapbusy-write', \ + 'readnb-mmap.dat' using 1:2:($3*loss_scale) title 'readnb-mmap', \ + 'read-mmap.dat' using 1:2:($3*loss_scale) title 'read-mmap', \ 'readbusy-noirq.dat' using 1:2:($3*loss_scale) title 'readbusy-noirq', \ - 'readnb-write.dat' using 1:2:($3*loss_scale) title 'readnb-write', \ - 'read-write.dat' using 1:2:($3*loss_scale) title 'read-write' + 'read-write.dat' using 1:2:($3*loss_scale) title 'read-write', \ + 'readbusy-write.dat' using 1:2:($3*loss_scale) title 'readbusy-write', \ + 'readnb-write.dat' using 1:2:($3*loss_scale) title 'readnb-write' diff --git a/ugw/data/preprocess.m b/ugw/data/preprocess.m index 26838a8..a43578d 100755 --- a/ugw/data/preprocess.m +++ b/ugw/data/preprocess.m @@ -10,6 +10,8 @@ datafiles = { "readnb-write.dat" "readbusy-write.dat" "readbusy-noirq.dat" + "readnb-mmap.dat" + "read-mmap.dat" "read-write.dat" "mmap-write.dat" "mmap-mmap.dat" diff --git a/ugw/data/throughput-dep.sh b/ugw/data/throughput-dep.sh index 57c8391..03698d6 100755 --- a/ugw/data/throughput-dep.sh +++ b/ugw/data/throughput-dep.sh @@ -2,7 +2,7 @@ titles=$(awk '{print $1}' 150/result) -delays=$(seq 126 2 170) +delays=$(seq 125 160) for i in $delays; do make -s -C $i diff --git a/ugw/ppc/S50ugw b/ugw/ppc/S50ugw index f9b28db..0d64093 100644 --- a/ugw/ppc/S50ugw +++ b/ugw/ppc/S50ugw @@ -4,6 +4,7 @@ ip link set can0 type can bitrate 1000000 ip link set up dev can0 ip link set can1 type can bitrate 1000000 ip link set up dev can1 +ifconfig can1 txqueuelen 100 set -x diff --git a/ugw/ugw.c b/ugw/ugw.c index e2c04ef..243fc5a 100644 --- a/ugw/ugw.c +++ b/ugw/ugw.c @@ -93,7 +93,7 @@ enum in2out in_read(struct in_ctx *ctx, struct can_frame *cf) perror("read"); exit(1); } - return SEND; + return STORE_ONLY; } void init_read(struct in_ctx *ctx) @@ -234,8 +234,10 @@ int out_packet_tx(struct out_ctx *ctx, struct can_frame *cf) { volatile struct tpacket2_hdr *hdr = ctx->ptr + ctx->current*FRAME_SIZE; - if (ctx->from_in == NOP) + if (ctx->from_in == NOP) { + CHECK(send(ctx->s, NULL, 0, 0)); return 0; + } while (hdr->tp_status != TP_STATUS_AVAILABLE) { CHECK(send(ctx->s, NULL, 0, 0));