1. 13 8月, 2015 4 次提交
  2. 11 8月, 2015 1 次提交
  3. 06 8月, 2015 1 次提交
  4. 05 8月, 2015 3 次提交
  5. 04 8月, 2015 9 次提交
  6. 03 8月, 2015 12 次提交
  7. 01 8月, 2015 6 次提交
  8. 30 7月, 2015 3 次提交
  9. 29 7月, 2015 1 次提交
    • S
      AioContext: force event loop iteration using BH · ca96ac44
      Stefan Hajnoczi 提交于
      The notify_me optimization introduced in commit eabc9779
      ("AioContext: fix broken ctx->dispatching optimization") skips
      event_notifier_set() calls when the event loop thread is not blocked in
      ppoll(2).
      
      This optimization causes a deadlock if two aio_context_acquire() calls
      race.  notify_me = 0 during the race so the winning thread can enter
      ppoll(2) unaware that the other thread is waiting its turn to acquire
      the AioContext.
      
      This patch forces ppoll(2) to return by scheduling a BH instead of
      calling aio_notify().
      
      The following deadlock with virtio-blk dataplane is fixed:
      
        qemu ... -object iothread,id=iothread0 \
                 -drive if=none,id=drive0,file=test.img,... \
                 -device virtio-blk-pci,iothread=iothread0,drive=drive0
      
      This command-line results in a hang early on without this patch.
      
      Thanks to Paolo Bonzini <pbonzini@redhat.com> for investigating this bug
      with me.
      
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1438101249-25166-4-git-send-email-pbonzini@redhat.com
      Message-Id: <1438014819-18125-3-git-send-email-stefanha@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ca96ac44