]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
New tests
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 19 Jan 2014 23:50:33 +0000 (00:50 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 19 Jan 2014 23:50:33 +0000 (00:50 +0100)
result: write() is the bottleneck

ugw/data/bench-all.sh
ugw/data/plot-thr.gp
ugw/data/preprocess.m
ugw/data/throughput-dep.sh
ugw/ppc/S50ugw
ugw/ugw.c

index 8697bdc5dc1a6d6d657aff75a72b6c42a7b2e898..e60a58b54922b65480414cc838c36439da5e51d0 100755 (executable)
@@ -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 .)
index 2966efacec020bfaebbefe019f899849e9bdd15f..b3a4bd4efdebd742e20aa905749061a8c944fe9f 100755 (executable)
@@ -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'
index 26838a8eae9a2f067e5f4d3078c8a73fc7d6339a..a43578d3a999b257fd1c73f91147a4220dce9030 100755 (executable)
@@ -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"
index 57c839151a5856f92a700def96587b0156e16558..03698d6a9fd2a428cefd2faf72acc05acfbee73e 100755 (executable)
@@ -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
index f9b28db5f3f97e0d22c16510a3211c4001bdb109..0d64093890560a5c9af5acdae830806b8934f579 100644 (file)
@@ -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
 
index e2c04ef7f7e9581d86fc70cff41b41f06190dc9a..243fc5a3c562f891d7c74b7cc7273b8758796e4e 100644 (file)
--- 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));