From: Jason Wang <jasowang@redhat.com>
To: mst@redhat.com, kvm@vger.kernel.org,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jason Wang <jasowang@redhat.com>
Subject: [PATCH net-next rfc V2 0/2] basic busy polling support for vhost_net
Date: Thu, 29 Oct 2015 04:45:24 -0400 [thread overview]
Message-ID: <1446108326-37765-1-git-send-email-jasowang@redhat.com> (raw)
Hi all:
This series tries to add basic busy polling for vhost net. The idea is
simple: at the end of tx processing, busy polling for new tx added
descriptor and rx receive socket for a while. The maximum number of
time (in us) could be spent on busy polling was specified through
module parameter.
Test were done through:
- 50 us as busy loop timeout
- Netperf 2.6
- Two machines with back to back connected mlx4
- Guest with 8 vcpus and 1 queue
Result shows very huge improvement on both tx (at most 158%) and rr
(at most 53%) while rx is as much as in the past. Most cases the cpu
utilization is also improved:
Guest TX:
size/session/+thu%/+normalize%
64/ 1/ +17%/ +6%
64/ 4/ +9%/ +17%
64/ 8/ +34%/ +21%
512/ 1/ +48%/ +40%
512/ 4/ +31%/ +20%
512/ 8/ +39%/ +22%
1024/ 1/ +158%/ +99%
1024/ 4/ +20%/ +11%
1024/ 8/ +40%/ +18%
2048/ 1/ +108%/ +74%
2048/ 4/ +21%/ +7%
2048/ 8/ +32%/ +14%
4096/ 1/ +94%/ +77%
4096/ 4/ +7%/ -6%
4096/ 8/ +9%/ -4%
16384/ 1/ +33%/ +9%
16384/ 4/ +10%/ -6%
16384/ 8/ +19%/ +2%
65535/ 1/ +15%/ -6%
65535/ 4/ +8%/ -9%
65535/ 8/ +14%/ 0%
Guest RX:
size/session/+thu%/+normalize%
64/ 1/ -3%/ -3%
64/ 4/ +4%/ +20%
64/ 8/ -1%/ -1%
512/ 1/ +20%/ +12%
512/ 4/ +1%/ +3%
512/ 8/ 0%/ -5%
1024/ 1/ +9%/ -2%
1024/ 4/ 0%/ +5%
1024/ 8/ +1%/ 0%
2048/ 1/ 0%/ +3%
2048/ 4/ -2%/ +3%
2048/ 8/ -1%/ -3%
4096/ 1/ -8%/ +3%
4096/ 4/ 0%/ +2%
4096/ 8/ 0%/ +5%
16384/ 1/ +3%/ 0%
16384/ 4/ +2%/ +2%
16384/ 8/ 0%/ +13%
65535/ 1/ 0%/ +3%
65535/ 4/ +2%/ -1%
65535/ 8/ +1%/ +14%
TCP_RR:
size/session/+thu%/+normalize%
1/ 1/ +8%/ -6%
1/ 50/ +18%/ +15%
1/ 100/ +22%/ +19%
1/ 200/ +25%/ +23%
64/ 1/ +2%/ -19%
64/ 50/ +46%/ +39%
64/ 100/ +47%/ +39%
64/ 200/ +50%/ +44%
512/ 1/ 0%/ -28%
512/ 50/ +50%/ +44%
512/ 100/ +53%/ +47%
512/ 200/ +51%/ +58%
1024/ 1/ +3%/ -14%
1024/ 50/ +45%/ +37%
1024/ 100/ +53%/ +49%
1024/ 200/ +48%/ +55%
Changes from V1:
- Add a comment for vhost_has_work() to explain why it could be
lockless
- Add param description for busyloop_timeout
- Split out the busy polling logic into a new helper
- Check and exit the loop when there's a pending signal
- Disable preemption during busy looping to make sure lock_clock() was
correctly used.
Todo:
- Make the busyloop timeout could be configure per VM through ioctl.
Please review.
Thanks
Jason Wang (2):
vhost: introduce vhost_has_work()
vhost_net: basic polling support
drivers/vhost/net.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++----
drivers/vhost/vhost.c | 7 +++++++
drivers/vhost/vhost.h | 1 +
3 files changed, 58 insertions(+), 4 deletions(-)
--
1.8.3.1
next reply other threads:[~2015-10-29 8:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 8:45 Jason Wang [this message]
2015-10-29 8:45 ` [PATCH net-next rfc V2 1/2] vhost: introduce vhost_has_work() Jason Wang
2015-10-29 8:45 ` [PATCH net-next rfc V2 2/2] vhost_net: basic polling support Jason Wang
2015-10-30 11:58 ` [PATCH net-next rfc V2 0/2] basic busy polling support for vhost_net Jason Wang
2015-11-03 7:46 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446108326-37765-1-git-send-email-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®