1. 12 11月, 2015 1 次提交
  2. 24 10月, 2015 2 次提交
  3. 16 10月, 2015 1 次提交
  4. 12 10月, 2015 1 次提交
  5. 02 10月, 2015 1 次提交
  6. 05 9月, 2015 1 次提交
    • M
      block/raw-posix: Use raw_normalize_devicepath() · bdd03cdf
      Max Reitz 提交于
      The filename given to qemu_open() in block/raw-posix.c should generally
      have been processed by raw_normalize_devicepath(); unless we are only
      probing (in which case the caller often checks whether the file is a
      block device or not, and this property will be changed by
      raw_normalize_devicepath() on NetBSD) or it is about a deprecated device
      (i.e. floppy).
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      bdd03cdf
  7. 07 7月, 2015 1 次提交
    • R
      block/raw-posix: Don't think /dev/fd/<NN> is a floppy drive. · 25d9747b
      Richard W.M. Jones 提交于
      In libguestfs we use /dev/fd/<NN> to pass pre-opened file descriptors
      to qemu-img.  Lately I've discovered that although this works, qemu
      believes that these are floppy disk images.  That in itself isn't much
      of a problem, but now qemu prints a warning about host floppy
      pass-thru being deprecated.
      
      Extend the existing test so that it ignores /dev/fd/ as well as
      /dev/fdset/
      
      A simple test of this, if you are using the bash shell, is:
      
        qemu-img info <( cat /dev/null )
      
      without this patch:
      
        $ qemu-img info <( cat /dev/null )
        qemu-img: Host floppy pass-through is deprecated
        Support for it will be removed in a future release.
        qemu-img: Could not open '/dev/fd/63': Could not refresh total sector count: Illegal seek
      
      with this patch:
      
        $ qemu-img info <( cat /dev/null )
        qemu-img: Could not open '/dev/fd/63': Could not refresh total sector count: Illegal seek
      Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1435761614-31358-1-git-send-email-rjones@redhat.com
      Fixes: https://bugs.launchpad.net/qemu/+bug/1470536Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      25d9747b
  8. 23 6月, 2015 5 次提交
  9. 12 6月, 2015 2 次提交
  10. 22 5月, 2015 2 次提交
    • D
      block: align bounce buffers to page · 459b4e66
      Denis V. Lunev 提交于
      The following sequence
          int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644);
          for (i = 0; i < 100000; i++)
                  write(fd, buf, 4096);
      performs 5% better if buf is aligned to 4096 bytes.
      
      The difference is quite reliable.
      
      On the other hand we do not want at the moment to enforce bounce
      buffering if guest request is aligned to 512 bytes.
      
      The patch changes default bounce buffer optimal alignment to
      MAX(page size, 4k). 4k is chosen as maximal known sector size on real
      HDD.
      
      The justification of the performance improve is quite interesting.
      From the kernel point of view each request to the disk was split
      by two. This could be seen by blktrace like this:
        9,0   11  1     0.000000000 11151  Q  WS 312737792 + 1023 [qemu-img]
        9,0   11  2     0.000007938 11151  Q  WS 312738815 + 8 [qemu-img]
        9,0   11  3     0.000030735 11151  Q  WS 312738823 + 1016 [qemu-img]
        9,0   11  4     0.000032482 11151  Q  WS 312739839 + 8 [qemu-img]
        9,0   11  5     0.000041379 11151  Q  WS 312739847 + 1016 [qemu-img]
        9,0   11  6     0.000042818 11151  Q  WS 312740863 + 8 [qemu-img]
        9,0   11  7     0.000051236 11151  Q  WS 312740871 + 1017 [qemu-img]
        9,0    5  1     0.169071519 11151  Q  WS 312741888 + 1023 [qemu-img]
      After the patch the pattern becomes normal:
        9,0    6  1     0.000000000 12422  Q  WS 314834944 + 1024 [qemu-img]
        9,0    6  2     0.000038527 12422  Q  WS 314835968 + 1024 [qemu-img]
        9,0    6  3     0.000072849 12422  Q  WS 314836992 + 1024 [qemu-img]
        9,0    6  4     0.000106276 12422  Q  WS 314838016 + 1024 [qemu-img]
      and the amount of requests sent to disk (could be calculated counting
      number of lines in the output of blktrace) is reduced about 2 times.
      
      Both qemu-img and qemu-io are affected while qemu-kvm is not. The guest
      does his job well and real requests comes properly aligned (to page).
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1431441056-26198-3-git-send-email-den@openvz.org
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      459b4e66
    • D
      block: minimal bounce buffer alignment · 4196d2f0
      Denis V. Lunev 提交于
      The patch introduces new concept: minimal memory alignment for bounce
      buffers. Original so called "optimal" value is actually minimal required
      value for aligment. It should be used for validation that the IOVec
      is properly aligned and bounce buffer is not required.
      
      Though, from the performance point of view, it would be better if
      bounce buffer or IOVec allocated by QEMU will be aligned stricter.
      
      The patch does not change any alignment value yet.
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1431441056-26198-2-git-send-email-den@openvz.org
      CC: Paolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4196d2f0
  11. 19 3月, 2015 2 次提交
  12. 10 3月, 2015 3 次提交
  13. 09 3月, 2015 1 次提交
    • D
      block/raw-posix: fix compilation warning on OSX · a6dcf097
      Denis V. Lunev 提交于
      block/raw-posix.c:947:19: warning: unused variable 's' [-Wunused-variable]
          BDRVRawState *s = aiocb->bs->opaque;
      
      This variable is used only when on of the following macros are defined
      CONFIG_XFS, CONFIG_FALLOCATE, CONFIG_FALLOCATE_PUNCH_HOLE or
      CONFIG_FALLOCATE_ZERO_RANGE. Fortunately, CONFIG_FALLOCATE_PUNCH_HOLE
      and CONFIG_FALLOCATE_ZERO_RANGE could be defined only along with
      CONFIG_FALLOCATE. Therefore checking for CONFIG_XFS or CONFIG_FALLOCATE
      would be enough.
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      CC: Peter Maydell <peter.maydell@linaro.org>
      CC: Kevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a6dcf097
  14. 16 2月, 2015 1 次提交
  15. 07 2月, 2015 7 次提交
  16. 10 12月, 2014 3 次提交
  17. 18 11月, 2014 6 次提交