result: write() is the bottleneck
dirs=oneatatime.ftrace
;;
-p)
dirs=oneatatime.ftrace
;;
-p)
declare -a args
for i in ${!dirs[*]}; do
args[$i]=-p${dirs[$i]}
declare -a args
for i in ${!dirs[*]}; do
args[$i]=-p${dirs[$i]}
-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
set -x
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";;
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";;
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";;
arg=${args[$i]}
dir=${dirs[$i]}
set -x
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 .)
mkdir -p $dir
scp glab:"$method-*.txt" $dir
(cd $dir && ln -sf ../Makefile ../plot.gp ../preprocess.m .)
set style data yerrorlines
# set yrange [0:10000]
set yrange [10:]
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 key left Left reverse
+set key reverse Left invert outside
'kernel.dat' using 1:2:($3*loss_scale) title 'kernel', \
'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', \
'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', \
'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', \
'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'
"readnb-write.dat"
"readbusy-write.dat"
"readbusy-noirq.dat"
"readnb-write.dat"
"readbusy-write.dat"
"readbusy-noirq.dat"
+ "readnb-mmap.dat"
+ "read-mmap.dat"
"read-write.dat"
"mmap-write.dat"
"mmap-mmap.dat"
"read-write.dat"
"mmap-write.dat"
"mmap-mmap.dat"
titles=$(awk '{print $1}' 150/result)
titles=$(awk '{print $1}' 150/result)
for i in $delays; do
make -s -C $i
for i in $delays; do
make -s -C $i
ip link set up dev can0
ip link set can1 type can bitrate 1000000
ip link set up dev can1
ip link set up dev can0
ip link set can1 type can bitrate 1000000
ip link set up dev can1
+ifconfig can1 txqueuelen 100
perror("read");
exit(1);
}
perror("read");
exit(1);
}
}
void init_read(struct in_ctx *ctx)
}
void init_read(struct in_ctx *ctx)
{
volatile struct tpacket2_hdr *hdr = ctx->ptr + ctx->current*FRAME_SIZE;
{
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));
while (hdr->tp_status != TP_STATUS_AVAILABLE) {
CHECK(send(ctx->s, NULL, 0, 0));
while (hdr->tp_status != TP_STATUS_AVAILABLE) {
CHECK(send(ctx->s, NULL, 0, 0));