1. 18 12月, 2015 6 次提交
  2. 17 12月, 2015 1 次提交
  3. 03 12月, 2015 1 次提交
  4. 19 11月, 2015 7 次提交
  5. 12 11月, 2015 16 次提交
  6. 11 11月, 2015 2 次提交
    • A
      throttle: Use bs->throttle_state instead of bs->io_limits_enabled · a0d64a61
      Alberto Garcia 提交于
      There are two ways to check for I/O limits in a BlockDriverState:
      
      - bs->throttle_state: if this pointer is not NULL, it means that this
        BDS is member of a throttling group, its ThrottleTimers structure
        has been initialized and its I/O limits are ready to be applied.
      
      - bs->io_limits_enabled: if true it means that the throttle_state
        pointer is valid _and_ the limits are currently enabled.
      
      The latter is used in several places to check whether a BDS has I/O
      limits configured, but what it really checks is whether requests
      are being throttled or not. For example, io_limits_enabled can be
      temporarily set to false in cases like bdrv_read_unthrottled() without
      otherwise touching the throtting configuration of that BDS.
      
      This patch replaces bs->io_limits_enabled with bs->throttle_state in
      all cases where what we really want to check is the existence of I/O
      limits, not whether they are currently enabled or not.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a0d64a61
    • M
      block: Make bdrv_states public · c69a4dd8
      Max Reitz 提交于
      When inserting a BDS tree into a BB, we will need to add the root BDS to
      this list. Since we will want to do that in the blockdev-insert-medium
      implementation in blockdev.c, we will need access to it there.
      
      This patch is not exactly elegant, but bdrv_states will be removed in
      the future anyway because we no longer need it since we have BBs.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c69a4dd8
  7. 09 11月, 2015 3 次提交
    • F
      aio: Introduce aio-epoll.c · fbe3fc5c
      Fam Zheng 提交于
      To minimize code duplication, epoll is hooked into aio-posix's
      aio_poll() instead of rolling its own. This approach also has both
      compile-time and run-time switchability.
      
      1) When QEMU starts with a small number of fds in the event loop, ppoll
      is used.
      
      2) When QEMU starts with a big number of fds, or when more devices are
      hot plugged, epoll kicks in when the number of fds hits the threshold.
      
      3) Some fds may not support epoll, such as tty based stdio. In this
      case, it falls back to ppoll.
      
      A rough benchmark with scsi-disk on virtio-scsi dataplane (epoll gets
      enabled from 64 onward). Numbers are in MB/s.
      
      ===============================================
                   |     master     |     epoll
                   |                |
      scsi disks # | read    randrw | read    randrw
      -------------|----------------|----------------
      1            | 86      36     | 92      45
      8            | 87      43     | 86      41
      64           | 71      32     | 70      38
      128          | 48      24     | 58      31
      256          | 37      19     | 57      28
      ===============================================
      
      To comply with aio_{disable,enable}_external, we always use ppoll when
      aio_external_disabled() is true.
      
      [Removed #ifdef CONFIG_EPOLL around AioContext epollfd field declaration
      since the field is also referenced outside CONFIG_EPOLL code.
      --Stefan]
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1446177989-6702-4-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      fbe3fc5c
    • F
      aio: Introduce aio_context_setup · 37fcee5d
      Fam Zheng 提交于
      This is the place to initialize platform specific bits of AioContext.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1446177989-6702-3-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      37fcee5d
    • F
      aio: Introduce aio_external_disabled · 5ceb9e39
      Fam Zheng 提交于
      This allows AioContext users to check the enable/disable state of
      external clients.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1446177989-6702-2-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      5ceb9e39
  8. 06 11月, 2015 1 次提交
  9. 24 10月, 2015 3 次提交