An error occurred fetching the project authors.
  1. 18 Apr, 2014 2 commits
  2. 26 Feb, 2014 1 commit
    • Michael S. Tsirkin's avatar
      vhost: fix ref cnt checking deadlock · 1d2e001b
      Michael S. Tsirkin authored
      [ Upstream commit 0ad8b480 ]
      
      vhost checked the counter within the refcnt before decrementing.  It
      really wanted to know that it is the one that has the last reference, as
      a way to batch freeing resources a bit more efficiently.
      
      Note: we only let refcount go to 0 on device release.
      
      This works well but we now access the ref counter twice so there's a
      race: all users might see a high count and decide to defer freeing
      resources.
      In the end no one initiates freeing resources until the last reference
      is gone (which is on VM shotdown so might happen after a looooong time).
      
      Let's do what we probably should have done straight away:
      switch from kref to plain atomic, documenting the
      semantics, return the refcount value atomically after decrement,
      then use that to avoid the deadlock.
      Reported-by: default avatarQin Chuanyu <qinchuanyu@huawei.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      1d2e001b
  3. 04 Sep, 2013 5 commits
  4. 11 Jul, 2013 2 commits
  5. 09 Jul, 2013 1 commit
  6. 07 Jul, 2013 2 commits
  7. 11 Jun, 2013 2 commits
  8. 10 Jun, 2013 1 commit
    • Jason Wang's avatar
      vhost_net: clear msg.control for non-zerocopy case during tx · 4364d5f9
      Jason Wang authored
      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: default avatarJason Wang <jasowang@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4364d5f9
  9. 06 May, 2013 3 commits
  10. 01 May, 2013 4 commits
  11. 11 Apr, 2013 1 commit
    • Jason Wang's avatar
      vhost_net: remove tx polling state · 70181d51
      Jason Wang authored
      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: default avatarJason Wang <jasowang@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70181d51
  12. 17 Mar, 2013 1 commit
  13. 29 Jan, 2013 2 commits
  14. 06 Dec, 2012 4 commits
  15. 03 Dec, 2012 1 commit
  16. 03 Nov, 2012 4 commits
  17. 25 Oct, 2012 1 commit
  18. 21 Jul, 2012 1 commit
  19. 11 May, 2012 1 commit
  20. 02 May, 2012 1 commit