1. 14 May, 2010 6 commits
  2. 13 May, 2010 33 commits
  3. 12 May, 2010 1 commit
    • Michael S. Tsirkin's avatar
      vhost: fix barrier pairing · 0d499356
      Michael S. Tsirkin authored
      According to memory-barriers.txt, an smp memory barrier in guest
      should always be paired with an smp memory barrier in host,
      and I quote "a lack of appropriate pairing is almost certainly an
      error". In case of vhost, failure to flush out used index
      update before looking at the interrupt disable flag
      could result in missed interrupts, resulting in
      networking hang under stress.
      
      This might happen when flags read bypasses used index write.
      So we see interrupts disabled and do not interrupt, at the
      same time guest writes flags value to enable interrupt,
      reads an old used index value, thinks that
      used ring is empty and waits for interrupt.
      
      Note: the barrier we pair with here is in
      drivers/virtio/virtio_ring.c, function
      vring_enable_cb.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarJuan Quintela <quintela@redhat.com>
      0d499356