1. 30 10月, 2009 1 次提交
  2. 28 10月, 2009 3 次提交
  3. 27 9月, 2009 1 次提交
  4. 12 9月, 2009 2 次提交
  5. 11 9月, 2009 1 次提交
  6. 28 8月, 2009 1 次提交
    • C
      raw-posix: refactor AIO support · 9ef91a67
      Christoph Hellwig 提交于
      Currently the raw-posix.c code contains a lot of knowledge about the
      asynchronous I/O scheme that is mostly implemented in posix-aio-compat.c.
      All this code does not really belong here and is getting a bit in the
      way of implementing native AIO on Linux.
      
      So instead move all the guts of the AIO implementation into
      posix-aio-compat.c (which might need a better name, btw).
      
      There's now a very small interface between the AIO providers and raw-posix.c:
      
       - an init routine is called from raw_open_common to return an AIO context
         for this drive.  An AIO implementation may either re-use one context
         for all drives, or use a different one for each as the Linux native
         AIO support will do.
       - an submit routine is called from the aio_reav/writev methods to submit
         an AIO request
      
      There are no indirect calls involved in this interface as we need to
      decide which one to call manually.  We will only call the Linux AIO native
      init function if we were requested to by vl.c, and we will only call
      the native submit function if we are asked to and the request is properly
      aligned.  That's also the reason why the alignment check actually does
      the inverse move and now goes into raw-posix.c.
      
      The old posix-aio-compat.h headers is removed now that most of it's
      content is private to posix-aio-compat.c, and instead we add a new
      block/raw-posix-aio.h headers is created containing only the tiny interface
      between raw-posix.c and the AIO implementation.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      9ef91a67
  7. 28 7月, 2009 1 次提交
  8. 09 5月, 2009 1 次提交
  9. 08 4月, 2009 2 次提交
  10. 29 3月, 2009 1 次提交
    • A
      new scsi-generic abstraction, use SG_IO (Christoph Hellwig) · 221f715d
      aliguori 提交于
      Okay, I started looking into how to handle scsi-generic I/O in the
      new world order.
      
      I think the best is to use the SG_IO ioctl instead of the read/write
      interface as that allows us to support scsi passthrough on disk/cdrom
      devices, too.  See Hannes patch on the kvm list from August for an
      example.
      
      Now that we always do ioctls we don't need another abstraction than
      bdrv_ioctl for the synchronous requests for now, and for asynchronous
      requests I've added a aio_ioctl abstraction keeping it simple.
      
      Long-term we might want to move the ops to a higher-level abstraction
      and let the low-level code fill out the request header, but I'm lazy
      enough to leave that to the people trying to support scsi-passthrough
      on a non-Linux OS.
      
      Tested lightly by issuing various sg_ commands from sg3-utils in a guest
      to a host CDROM device.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6895 c046a42c-6fe2-441c-8c8c-71466251a162
      221f715d
  11. 21 2月, 2009 5 次提交
  12. 24 1月, 2009 1 次提交
  13. 17 1月, 2009 1 次提交
  14. 13 1月, 2009 1 次提交
    • A
      Fix race in POSIX AIO emulation (Jan Kiszka) · f094a782
      aliguori 提交于
      When we cancel an AIO request that is already being processed by
      aio_thread, qemu_paio_cancel should return QEMU_PAIO_NOTCANCELED as long
      as aio_thread isn't done with this request. But as the latter currently
      updates aiocb->ret after every block of the request, we may report
      QEMU_PAIO_ALLDONE too early.
      
      Futhermore, in case some zero-length request should have been queued,
      aiocb->ret is never set to != -EINPROGRESS and callers like
      raw_aio_cancel could get stuck in an endless loop.
      
      Fix those issues by updating aiocb->ret _after_ the request has been
      fully processed. This also simplifies the locking.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6278 c046a42c-6fe2-441c-8c8c-71466251a162
      f094a782
  15. 13 12月, 2008 2 次提交
    • B
      Remove unnecessary trailing newlines · 1d6198c3
      blueswir1 提交于
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6000 c046a42c-6fe2-441c-8c8c-71466251a162
      1d6198c3
    • A
      Replace posix-aio with custom thread pool · 3c529d93
      aliguori 提交于
      glibc implements posix-aio as a thread pool and imposes a number of limitations.
      
      1) it limits one request per-file descriptor.  we hack around this by dup()'ing
      file descriptors which is hideously ugly
      
      2) it's impossible to add new interfaces and we need a vectored read/write
      operation to properly support a zero-copy API.
      
      What has been suggested to me by glibc folks, is to implement whatever new
      interfaces we want and then it can eventually be proposed for standardization.
      This requires that we implement our own posix-aio implementation though.
      
      This patch implements posix-aio using pthreads.  It immediately eliminates the
      need for fd pooling.
      
      It performs at least as well as the current posix-aio code (in some
      circumstances, even better).
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5996 c046a42c-6fe2-441c-8c8c-71466251a162
      3c529d93