1. 27 Feb, 2015 1 commit
  2. 15 Feb, 2015 1 commit
  3. 04 Feb, 2015 3 commits
  4. 13 Jan, 2015 1 commit
  5. 07 Jan, 2015 1 commit
  6. 09 Dec, 2014 5 commits
  7. 23 Jun, 2014 1 commit
  8. 09 Jun, 2014 3 commits
    • Michael S. Tsirkin's avatar
      vhost: move memory pointer to VQs · 47283bef
      Michael S. Tsirkin authored
      
      commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc
          vhost: replace rcu with mutex
      replaced rcu sync for memory accesses with VQ mutex locl/unlock.
      This is correct since all accesses are under VQ mutex, but incomplete:
      we still do useless rcu lock/unlock operations, someone might copy this
      code into some other context where this won't be right.
      This use of RCU is also non standard and hard to understand.
      Let's copy the pointer to each VQ structure, this way
      the access rules become straight-forward, and there's
      no need for RCU anymore.
      Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      47283bef
    • Michael S. Tsirkin's avatar
      vhost: move acked_features to VQs · ea16c514
      Michael S. Tsirkin authored
      
      Refactor code to make sure features are only accessed
      under VQ mutex. This makes everything simpler, no need
      for RCU here anymore.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      ea16c514
    • Michael S. Tsirkin's avatar
      vhost-net: extend device allocation to vmalloc · 23cc5a99
      Michael S. Tsirkin authored
      
      Michael Mueller provided a patch to reduce the size of
      vhost-net structure as some allocations could fail under
      memory pressure/fragmentation. We are still left with
      high order allocations though.
      
      This patch is handling the problem at the core level, allowing
      vhost structures to use vmalloc() if kmalloc() failed.
      
      As vmalloc() adds overhead on a critical network path, add __GFP_REPEAT
      to kzalloc() flags to do this fallback only when really needed.
      
      People are still looking at cleaner ways to handle the problem
      at the API level, probably passing in multiple iovecs.
      This hack seems consistent with approaches
      taken since then by drivers/vhost/scsi.c and net/core/dev.c
      
      Based on patch by Romain Francoise.
      
      Cc: Michael Mueller <mimu@linux.vnet.ibm.com>
      Signed-off-by: default avatarRomain Francoise <romain@orebokech.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      23cc5a99
  9. 02 Apr, 2014 1 commit
  10. 28 Mar, 2014 2 commits
  11. 13 Feb, 2014 2 commits
  12. 06 Dec, 2013 1 commit
  13. 04 Sep, 2013 5 commits
  14. 11 Jul, 2013 2 commits
  15. 09 Jul, 2013 1 commit
  16. 07 Jul, 2013 2 commits
  17. 11 Jun, 2013 2 commits
  18. 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
  19. 06 May, 2013 3 commits
  20. 01 May, 2013 2 commits