Skip to content
Snippets Groups Projects
  1. Jan 14, 2022
  2. Jan 12, 2022
    • Stefan Hajnoczi's avatar
      aio-posix: split poll check from ready handler · 826cc324
      Stefan Hajnoczi authored
      
      Adaptive polling measures the execution time of the polling check plus
      handlers called when a polled event becomes ready. Handlers can take a
      significant amount of time, making it look like polling was running for
      a long time when in fact the event handler was running for a long time.
      
      For example, on Linux the io_submit(2) syscall invoked when a virtio-blk
      device's virtqueue becomes ready can take 10s of microseconds. This
      can exceed the default polling interval (32 microseconds) and cause
      adaptive polling to stop polling.
      
      By excluding the handler's execution time from the polling check we make
      the adaptive polling calculation more accurate. As a result, the event
      loop now stays in polling mode where previously it would have fallen
      back to file descriptor monitoring.
      
      The following data was collected with virtio-blk num-queues=2
      event_idx=off using an IOThread. Before:
      
      168k IOPS, IOThread syscalls:
      
        9837.115 ( 0.020 ms): IO iothread1/620155 io_submit(ctx_id: 140512552468480, nr: 16, iocbpp: 0x7fcb9f937db0)    = 16
        9837.158 ( 0.002 ms): IO iothread1/620155 write(fd: 103, buf: 0x556a2ef71b88, count: 8)                         = 8
        9837.161 ( 0.001 ms): IO iothread1/620155 write(fd: 104, buf: 0x556a2ef71b88, count: 8)                         = 8
        9837.163 ( 0.001 ms): IO iothread1/620155 ppoll(ufds: 0x7fcb90002800, nfds: 4, tsp: 0x7fcb9f1342d0, sigsetsize: 8) = 3
        9837.164 ( 0.001 ms): IO iothread1/620155 read(fd: 107, buf: 0x7fcb9f939cc0, count: 512)                        = 8
        9837.174 ( 0.001 ms): IO iothread1/620155 read(fd: 105, buf: 0x7fcb9f939cc0, count: 512)                        = 8
        9837.176 ( 0.001 ms): IO iothread1/620155 read(fd: 106, buf: 0x7fcb9f939cc0, count: 512)                        = 8
        9837.209 ( 0.035 ms): IO iothread1/620155 io_submit(ctx_id: 140512552468480, nr: 32, iocbpp: 0x7fca7d0cebe0)    = 32
      
      174k IOPS (+3.6%), IOThread syscalls:
      
        9809.566 ( 0.036 ms): IO iothread1/623061 io_submit(ctx_id: 140539805028352, nr: 32, iocbpp: 0x7fd0cdd62be0)    = 32
        9809.625 ( 0.001 ms): IO iothread1/623061 write(fd: 103, buf: 0x5647cfba5f58, count: 8)                         = 8
        9809.627 ( 0.002 ms): IO iothread1/623061 write(fd: 104, buf: 0x5647cfba5f58, count: 8)                         = 8
        9809.663 ( 0.036 ms): IO iothread1/623061 io_submit(ctx_id: 140539805028352, nr: 32, iocbpp: 0x7fd0d0388b50)    = 32
      
      Notice that ppoll(2) and eventfd read(2) syscalls are eliminated because
      the IOThread stays in polling mode instead of falling back to file
      descriptor monitoring.
      
      As usual, polling is not implemented on Windows so this patch ignores
      the new io_poll_read() callback in aio-win32.c.
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Message-id: 20211207132336.36627-2-stefanha@redhat.com
      
      [Fixed up aio_set_event_notifier() calls in
      tests/unit/test-fdmon-epoll.c added after this series was queued.
      --Stefan]
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      826cc324
    • Volker Rümelin's avatar
      meson: reenable filemonitor-inotify compilation · 9d30c78c
      Volker Rümelin authored
      Reenable util/filemonitor-inotify compilation. Compilation was
      disabled when commit a620fbe9 ("configure: convert compiler tests
      to meson, part 5") moved CONFIG_INOTIFY1 from config-host.mak to
      config-host.h.
      
      This fixes the usb-mtp device and reenables test-util-filemonitor.
      
      Fixes: a620fbe9 ("configure: convert compiler tests to meson, part 5")
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/800
      
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20220107133514.7785-1-vr_qemu@t-online.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      9d30c78c
    • Paolo Bonzini's avatar
      meson: build all modules by default · fb72176b
      Paolo Bonzini authored
      With more recent versions of Meson, the build.ninja file is more selective
      as to what is built by default, and not building the modules results in test
      failures.
      
      Mark the modules as built-by-default and, to make the dependencies more
      precise, also require them to be up-to-date before running tests.
      
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/801
      
      
      Tested-by: default avatarLi Zhang <lizhang@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fb72176b
    • Philippe Mathieu-Daudé's avatar
      tests/tcg: Fix target-specific Makefile variables path for user-mode · 533b0a1a
      Philippe Mathieu-Daudé authored
      
      Commit 812b31d3 refactor missed to update this path.
      
      Fixes: 812b31d3 ("configs: rename default-configs to configs and reorganise")
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20211226001541.3807919-1-f4bug@amsat.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      533b0a1a
  3. Jan 08, 2022
  4. Jan 05, 2022
  5. Jan 04, 2022
  6. Dec 31, 2021
  7. Dec 28, 2021
  8. Dec 23, 2021
Loading