busy_poll* : revise poll_cmp
PATCH 1/1 busy_poll* : revise poll_cmp
set low latency busy poll to 50 per socket will spent more time than set low latency busy poll to 0 per socket. that mean the value of res_50 is bigger than res_0, so the value of poll_comp always less than zero and test fail.
--- testcases/network/busy_poll/busy_poll01.sh | 2 +- testcases/network/busy_poll/busy_poll02.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0
b/testcases/network/busy_poll/busy_poll01.sh index 3c3035600..119ae0176 100755
testcases/network/busy_poll/busy_poll01.sh +1 -1
@@ -60,7 +60,7 @@ for x in 50 0; do tst_netload -H $(tst_ipaddr rhost) -d res_$x done -poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) +poll_cmp=$(( 100 - ($(cat res_0) * 100) / $(cat res_50) )) if [ "$poll_cmp" -lt 1 ]; then tst_resm TFAIL "busy poll result is '$poll_cmp' %"
(quoted diff) +0 -0
b/testcases/network/busy_poll/busy_poll02.sh index 427857996..05b5cf8c4 100755
testcases/network/busy_poll/busy_poll02.sh +1 -1
@@ -51,7 +51,7 @@ for x in 50 0; do tst_netload -H $(tst_ipaddr rhost) -d res_$x -b $x done -poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) +poll_cmp=$(( 100 - ($(cat res_0) * 100) / $(cat res_50) )) if [ "$poll_cmp" -lt 1 ]; then tst_resm TFAIL "busy poll result is '$poll_cmp' %"
Signature · 8 lines
2.16.2 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20180319/4f9f0282/attachment.html>
PATCH 1/1 busy_poll* : revise poll_cmp
Quoted 5 lines · sunlianwen
set low latency busy poll to 50 per socket will spent more time than set low latency busy poll to 0 per socket. that mean the value of
res_50is bigger thanres_0, so the value ofpoll_compalways less than zero and test fail.
No, if busy poll is enabled, i.e. value set above 0, we should expect performance gain in this test.
With what driver and kernel version you have such results? Is it really supported by that driver?
Thanks,
Alexey
PATCH 1/1 busy_poll* : revise poll_cmp
Hi Alexey
You are right, I think is wrong, I debug this case again,
and find the driver is virtio_net no support busy poll.
Thanks your advise.
Best Regards,
Lianwen Sun.
Quoted 6 lines · Alexey Kodanev
Quoted 5 lines · sunlianwen
set low latency busy poll to 50 per socket will spent more time than set low latency busy poll to 0 per socket. that mean the value of
res_50is bigger thanres_0, so the value ofpoll_compalways less than zero and test fail.
Quoted 11 lines
No, if busy poll is enabled, i.e. value set above 0, we should expect performance gain in this test.
With what driver and kernel version you have such results? Is it really supported by that driver?
Thanks,
Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20180320/900716ab/attachment.html>
PATCH 1/1 busy_poll* : revise poll_cmp
Quoted 5 lines · sunlianwen
Hi Alexey
 You are right, I think is wrong, I debug this case again,
and find the driver is
virtio_netno support busy poll.
There is support in virtio_net... may be the problem in the underlying configuration/driver, latency between guest and the other host? you could also try netperf -H remote_host -t TCP_RR with/without busy_polling:
# sysctl net.core.busy_read=50 # sysctl net.core.busy_poll=50
Thanks,
Alexey
PATCH 1/1 busy_poll* : revise poll_cmp
Hi Alexey
Quoted 5 lines · Alexey Kodanev
Quoted 4 lines · sunlianwen
Hi Alexey
You are right, I think is wrong, I debug this case again,
Quoted 9 lines
Quoted 1 line
and find the driver is
virtio_netno support busy poll.There is support in
virtio_net... may be the problem in the underlying configuration/driver, latency between guest and the other host? you could also try netperf -Hremote_host-tTCP_RRwith/withoutbusy_polling:# sysctl net.core.busy_read=50 # sysctl net.core.busy_poll=50
Thanks your advise. and I find a patch:"virtio_net: remove custom busy_poll"
patch link :https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/virtio_net.c?id=ceef438d613f6d I am not sure whether this patch mean virtio_net no support busy poll.
Below is debuginfo follow your advise.
# sysctl net.core.busy_read=0 net.core.busy_read = 0
# sysctl net.core.busy_poll=0 net.core.busy_poll = 0
# netperf -H 192.168.122.248 -t TCP_RR MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.122.248 () port 0 AF_INET : first burst 0 Local /Remote Socket Size Request Resp. Elapsed Trans. Send Recv Size Size Time Rate bytes Bytes bytes bytes secs. per sec
16384 87380 1 1 10.00 30101.63
16384 87380
# sysctl net.core.busy_read=50 net.core.busy_read = 50 # sysctl net.core.busy_poll=50 net.core.busy_poll = 50
# netperf -H 192.168.122.248 -t TCP_RR MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.122.248 () port 0 AF_INET : first burst 0 Local /Remote Socket Size Request Resp. Elapsed Trans. Send Recv Size Size Time Rate bytes Bytes bytes bytes secs. per sec
16384 87380 1 1 10.00 37968.90
16384 87380
-----------------------------------------------------------------------
<<<test_output>>>
incrementing stopbusy_poll01 1 TINFO: Network config (local -- remote):busy_poll01 1 TINFO: eth1 -- eth1busy_poll01 1 TINFO: 192.168.1.41/24 -- 192.168.1.20/24 busy_poll01 1 TINFO: fd00:1:1:1::1/64 -- fd00:1:1:1::2/64 busy_poll01 1 TINFO: set low latency busy poll to 50 busy_poll01 1 TINFO: run server 'netstress -R 500000 -B /tmp/ltp-EmybkMxKgu/busy_poll01.IIOgfKYQ6P'busy_poll01 1 TINFO: run client 'netstress -l -H 192.168.1.20 -a 2 -r 500000 -d res_50 -g 44175'busy_poll01 1 TPASS: netstress passed, time spent '53265' ms busy_poll01 2 TINFO: set low latency busy poll to 0 busy_poll01 2 TINFO: run server 'netstress -R 500000 -B /tmp/ltp-EmybkMxKgu/busy_poll01.IIOgfKYQ6P'busy_poll01 2 TINFO: run client 'netstress -l -H 192.168.1.20 -a 2 -r 500000 -d res_0 -g 46767'busy_poll01 2 TPASS: netstress passed, time spent '23393' ms busy_poll01 3 TFAIL: busy poll result is '-127' % <<<execution_status>>>
initiation_status="ok"
duration=79 termination_type=exited termination_id=1 corefile=no cutime=148 cstime=6930
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20180118
###############################################################
Done executing testcases.
LTP Version: 20180118
###############################################################
Thanks,
Lianwen Sun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20180322/f8d6223c/attachment.html>
PATCH 1/1 busy_poll* : revise poll_cmp
Quoted 14 lines · sunlianwen
Hi Alexey
Quoted 11 lines · Alexey Kodanev
Quoted 5 lines · sunlianwen
Hi Alexey
You are right, I think is wrong, I debug this case again,
and find the driver is
virtio_netno support busy poll.There is support in
virtio_net... may be the problem in the underlying configuration/driver, latency between guest and the other host? you could also try netperf -Hremote_host-tTCP_RRwith/withoutbusy_polling:
Quoted 6 lines
Quoted 3 lines
# sysctl net.core.busy_read=50 # sysctl net.core.busy_poll=50Thanks your advise. and I find a patch:"virtio_net: remove custom
busy_poll"
patch link :https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/virtio_net.c?id=ceef438d613f6d I am not sure whether this patch meanvirtio_netno support busy poll.
It means it is using generic busy polling implementation now.
Quoted 31 lines
Below is debuginfo follow your advise.
# sysctl net.core.busy_read=0 net.core.busy_read = 0# sysctl net.core.busy_poll=0 net.core.busy_poll = 0# netperf -H 192.168.122.248 -t TCP_RR MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.122.248 () port 0 AF_INET : first burst 0 Local /Remote Socket Size Request Resp. Elapsed Trans. Send Recv Size Size Time Rate bytes Bytes bytes bytes secs. per sec16384 87380 1 1 10.00 30101.63
16384 87380# sysctl net.core.busy_read=50 net.core.busy_read = 50 # sysctl net.core.busy_poll=50 net.core.busy_poll = 50# netperf -H 192.168.122.248 -t TCP_RR MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.122.248 () port 0 AF_INET : first burst 0 Local /Remote Socket Size Request Resp. Elapsed Trans. Send Recv Size Size Time Rate bytes Bytes bytes bytes secs. per sec
Quoted 3 lines
16384 87380 1 1 10.00 37968.90
16384 87380
Looks like busy polling is working, transaction rate is obviously faster than without busy polling.
Quoted 6 lines
-----------------------------------------------------------------------
<<<test_output>>>
incrementing stopbusy_poll011 TINFO: Network config (local -- remote):busy_poll011 TINFO: eth1 -- eth1busy_poll011 TINFO: 192.168.1.41/24 -- 192.168.1.20/24
You run netperf with 192.168.122.248 server, LTP using the other hosts? Could you check netperf and LTP for the same hosts/interfaces?
Quoted 25 lines
busy_poll011 TINFO: fd00:1:1:1::1/64 -- fd00:1:1:1::2/6>busy_poll011 TINFO: set low latency busy poll to 50busy_poll011 TINFO: run server 'netstress -R 500000 -B/tmp/ltp-EmybkMxKgu/busy_poll01.IIOgfKYQ6P'busy_poll011 TINFO: run client 'netstress -l -H 192.168.1.20 -a 2 -r 500000 -dres_50-g 44175'busy_poll011 TPASS: netstress passed, time spent '53265' msbusy_poll012 TINFO: set low latency busy poll to 0busy_poll012 TINFO: run server 'netstress -R 500000 -B/tmp/ltp-EmybkMxKgu/busy_poll01.IIOgfKYQ6P'busy_poll012 TINFO: run client 'netstress -l -H 192.168.1.20 -a 2 -r 500000 -dres_0-g 46767'busy_poll012 TPASS: netstress passed, time spent '23393' msbusy_poll013 TFAIL: busy poll result is '-127' %
<<<execution_status>>>
initiation_status="ok"
duration=79 termination_type=exited termination_id=1 corefile=no
cutime=148 cstime=6930
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20180118###############################################################
Done executing testcases.
LTP Version: 20180118
###############################################################Thanks,
Lianwen Sun
PATCH 1/1 busy_poll* : revise poll_cmp
In reply to Alexey KodanevQuoted 11 lines · Alexey Kodanev
Quoted 5 lines · sunlianwen
set low latency busy poll to 50 per socket will spent more time than set low latency busy poll to 0 per socket. that mean the value of
res_50is bigger thanres_0, so the value ofpoll_compalways less than zero and test fail.No, if busy poll is enabled, i.e. value set above 0, we should expect performance gain in this test.
With what driver and kernel version you have such results? Is it really supported by that driver?
the kernel version is 4.16-rc5, the driver is virtio_net.
Quoted 5 lines
Thanks,
Alexey
Thanks,
Lianwen Sun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20180320/a93edea1/attachment.html>