1. 11 6月, 2013 2 次提交
    • M
      vhost: check owner before we overwrite ubuf_info · 05c05351
      Michael S. Tsirkin 提交于
      If device has an owner, we shouldn't touch ubuf_info
      since it might be in use.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05c05351
    • J
      vhost_net: clear msg.control for non-zerocopy case during tx · 4364d5f9
      Jason Wang 提交于
      When we decide not use zero-copy, msg.control should be set to NULL otherwise
      macvtap/tap may set zerocopy callbacks which may decrease the kref of ubufs
      wrongly.
      
      Bug were introduced by commit cedb9bdc
      (vhost-net: skip head management if no outstanding).
      
      This solves the following warnings:
      
      WARNING: at include/linux/kref.h:47 handle_tx+0x477/0x4b0 [vhost_net]()
      Modules linked in: vhost_net macvtap macvlan tun nfsd exportfs bridge stp llc openvswitch kvm_amd kvm bnx2 megaraid_sas [last unloaded: tun]
      CPU: 5 PID: 8670 Comm: vhost-8668 Not tainted 3.10.0-rc2+ #1566
      Hardware name: Dell Inc. PowerEdge R715/00XHKG, BIOS 1.5.2 04/19/2011
      ffffffffa0198323 ffff88007c9ebd08 ffffffff81796b73 ffff88007c9ebd48
      ffffffff8103d66b 000000007b773e20 ffff8800779f0000 ffff8800779f43f0
      ffff8800779f8418 000000000000015c 0000000000000062 ffff88007c9ebd58
      Call Trace:
      [<ffffffff81796b73>] dump_stack+0x19/0x1e
      [<ffffffff8103d66b>] warn_slowpath_common+0x6b/0xa0
      [<ffffffff8103d6b5>] warn_slowpath_null+0x15/0x20
      [<ffffffffa0197627>] handle_tx+0x477/0x4b0 [vhost_net]
      [<ffffffffa0197690>] handle_tx_kick+0x10/0x20 [vhost_net]
      [<ffffffffa019541e>] vhost_worker+0xfe/0x1a0 [vhost_net]
      [<ffffffffa0195320>] ? vhost_attach_cgroups_work+0x30/0x30 [vhost_net]
      [<ffffffffa0195320>] ? vhost_attach_cgroups_work+0x30/0x30 [vhost_net]
      [<ffffffff81061f46>] kthread+0xc6/0xd0
      [<ffffffff81061e80>] ? kthread_freezable_should_stop+0x70/0x70
      [<ffffffff817a1aec>] ret_from_fork+0x7c/0xb0
      [<ffffffff81061e80>] ? kthread_freezable_should_stop+0x70/0x70
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4364d5f9
  2. 06 5月, 2013 3 次提交
  3. 01 5月, 2013 4 次提交
  4. 12 4月, 2013 1 次提交
    • J
      vhost_net: remove tx polling state · 70181d51
      Jason Wang 提交于
      After commit 2b8b328b (vhost_net: handle polling
      errors when setting backend), we in fact track the polling state through
      poll->wqh, so there's no need to duplicate the work with an extra
      vhost_net_polling_state. So this patch removes this and make the code simpler.
      
      This patch also removes the all tx starting/stopping code in tx path according
      to Michael's suggestion.
      
      Netperf test shows almost the same result in stream test, but gets improvements
      on TCP_RR tests (both zerocopy or copy) especially on low load cases.
      
      Tested between multiqueue kvm guest and external host with two direct
      connected 82599s.
      
      zerocopy disabled:
      
      sessions|transaction rates|normalize|
      before/after/+improvements
      1 | 9510.24/11727.29/+23.3%    | 693.54/887.68/+28.0%   |
      25| 192931.50/241729.87/+25.3% | 2376.80/2771.70/+16.6% |
      50| 277634.64/291905.76/+5%    | 3118.36/3230.11/+3.6%  |
      
      zerocopy enabled:
      
      sessions|transaction rates|normalize|
      before/after/+improvements
      1 | 7318.33/11929.76/+63.0%    | 521.86/843.30/+61.6%   |
      25| 167264.88/242422.15/+44.9% | 2181.60/2788.16/+27.8% |
      50| 272181.02/294347.04/+8.1%  | 3071.56/3257.85/+6.1%  |
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      70181d51
  5. 18 3月, 2013 1 次提交
  6. 30 1月, 2013 2 次提交
  7. 06 12月, 2012 4 次提交
  8. 04 12月, 2012 1 次提交
  9. 03 11月, 2012 4 次提交
  10. 25 10月, 2012 1 次提交
  11. 22 7月, 2012 1 次提交
  12. 12 5月, 2012 1 次提交
  13. 02 5月, 2012 3 次提交
  14. 14 4月, 2012 1 次提交
  15. 28 2月, 2012 1 次提交
  16. 14 1月, 2012 1 次提交
  17. 21 7月, 2011 2 次提交
  18. 19 7月, 2011 2 次提交
    • J
      vhost: init used ring after backend was set · f59281da
      Jason Wang 提交于
      Move the used ring initialization after backend was set. This
      makes it possible to disable the backend and tweak the used ring,
      then restart. This will also make it possible to log the used ring
      write correctly.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      f59281da
    • M
      vhost: vhost TX zero-copy support · bab632d6
      Michael S. Tsirkin 提交于
      >From: Shirley Ma <mashirle@us.ibm.com>
      
      This adds experimental zero copy support in vhost-net,
      disabled by default. To enable, set
      experimental_zcopytx module option to 1.
      
      This patch maintains the outstanding userspace buffers in the
      sequence it is delivered to vhost. The outstanding userspace buffers
      will be marked as done once the lower device buffers DMA has finished.
      This is monitored through last reference of kfree_skb callback. Two
      buffer indices are used for this purpose.
      
      The vhost-net device passes the userspace buffers info to lower device
      skb through message control. DMA done status check and guest
      notification are handled by handle_tx: in the worst case is all buffers
      in the vq are in pending/done status, so we need to notify guest to
      release DMA done buffers first before we get any new buffers from the
      vq.
      
      One known problem is that if the guest stops submitting
      buffers, buffers might never get used until some
      further action, e.g. device reset. This does not
      seem to affect linux guests.
      Signed-off-by: NShirley <xma@us.ibm.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bab632d6
  19. 30 5月, 2011 1 次提交
  20. 14 3月, 2011 2 次提交
  21. 13 3月, 2011 2 次提交