1. 09 12月, 2016 3 次提交
  2. 16 11月, 2016 1 次提交
  3. 31 8月, 2016 1 次提交
  4. 23 8月, 2016 1 次提交
  5. 15 8月, 2016 1 次提交
  6. 09 8月, 2016 1 次提交
  7. 02 8月, 2016 11 次提交
  8. 01 7月, 2016 1 次提交
    • J
      tun: switch to use skb array for tx · 1576d986
      Jason Wang 提交于
      We used to queue tx packets in sk_receive_queue, this is less
      efficient since it requires spinlocks to synchronize between producer
      and consumer.
      
      This patch tries to address this by:
      
      - switch from sk_receive_queue to a skb_array, and resize it when
        tx_queue_len was changed.
      - introduce a new proto_ops peek_len which was used for peeking the
        skb length.
      - implement a tun version of peek_len for vhost_net to use and convert
        vhost_net to use peek_len if possible.
      
      Pktgen test shows about 15.3% improvement on guest receiving pps for small
      buffers:
      
      Before: ~1300000pps
      After : ~1500000pps
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1576d986
  9. 08 6月, 2016 1 次提交
    • J
      vhost_net: stop polling socket during rx processing · 8241a1e4
      Jason Wang 提交于
      We don't stop rx polling socket during rx processing, this will lead
      unnecessary wakeups from under layer net devices (E.g
      sock_def_readable() form tun). Rx will be slowed down in this
      way. This patch avoids this by stop polling socket during rx
      processing. A small drawback is that this introduces some overheads in
      light load case because of the extra start/stop polling, but single
      netperf TCP_RR does not notice any change. In a super heavy load case,
      e.g using pktgen to inject packet to guest, we get about ~8.8%
      improvement on pps:
      
      before: ~1240000 pkt/s
      after:  ~1350000 pkt/s
      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>
      8241a1e4
  10. 10 5月, 2016 2 次提交
  11. 11 3月, 2016 4 次提交
  12. 02 3月, 2016 3 次提交
    • G
      vhost: rename vhost_init_used() · 80f7d030
      Greg Kurz 提交于
      Looking at how callers use this, maybe we should just rename init_used
      to vhost_vq_init_access. The _used suffix was a hint that we
      access the vq used ring. But maybe what callers care about is
      that it must be called after access_ok.
      
      Also, this function manipulates the vq->is_le field which isn't related
      to the vq used ring.
      
      This patch simply renames vhost_init_used() to vhost_vq_init_access() as
      suggested by Michael.
      
      No behaviour change.
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      80f7d030
    • G
      vhost: rename cross-endian helpers · c5072037
      Greg Kurz 提交于
      The default use case for vhost is when the host and the vring have the
      same endianness (default native endianness). But there are cases where
      they differ and vhost should byteswap when accessing the vring.
      
      The first case is when the host is big endian and the vring belongs to
      a virtio 1.0 device, which is always little endian.
      
      This is covered by the vq->is_le field. This field is initialized when
      userspace calls the VHOST_SET_FEATURES ioctl. It is reset when the device
      stops.
      
      We already have a vhost_init_is_le() helper, but the reset operation is
      opencoded as follows:
      
      	vq->is_le = virtio_legacy_is_little_endian();
      
      It isn't clear that we are resetting vq->is_le here.
      
      This patch moves the code to a helper with a more explicit name.
      
      The other case where we may have to byteswap is when the architecture can
      switch endianness at runtime (bi-endian). If endianness differs in the host
      and in the guest, then legacy devices need to be used in cross-endian mode.
      
      This mode is available with CONFIG_VHOST_CROSS_ENDIAN_LEGACY=y, which
      introduces a vq->user_be field. Userspace may enable cross-endian mode
      by calling the SET_VRING_ENDIAN ioctl before the device is started. The
      cross-endian mode is disabled when the device is stopped.
      
      The current names of the helpers that manipulate vq->user_be are unclear.
      
      This patch renames those helpers to clearly show that this is cross-endian
      stuff and with explicit enable/disable semantics.
      
      No behaviour change.
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c5072037
    • G
      vhost: fix error path in vhost_init_used() · e1f33be9
      Greg Kurz 提交于
      We don't want side effects. If something fails, we rollback vq->is_le to
      its previous value.
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      e1f33be9
  13. 09 12月, 2015 1 次提交
  14. 07 12月, 2015 3 次提交
  15. 04 12月, 2015 2 次提交
  16. 28 10月, 2015 1 次提交
  17. 14 10月, 2015 1 次提交
  18. 16 9月, 2015 1 次提交
  19. 06 8月, 2015 1 次提交