Skip to content
Snippets Groups Projects
  1. Oct 10, 2023
    • Andrei Gudkov's avatar
      migration/dirtyrate: use QEMU_CLOCK_HOST to report start-time · 320a6ccc
      Andrei Gudkov authored
      
      Currently query-dirty-rate uses QEMU_CLOCK_REALTIME as
      the source for start-time field. This translates to
      clock_gettime(CLOCK_MONOTONIC), i.e. number of seconds
      since host boot. This is not very useful. The only
      reasonable use case of start-time I can imagine is to
      check whether previously completed measurements are
      too old or not. But this makes sense only if start-time
      is reported as host wall-clock time.
      
      This patch replaces source of start-time from
      QEMU_CLOCK_REALTIME to QEMU_CLOCK_HOST.
      
      Signed-off-by: default avatarAndrei Gudkov <gudkov.andrei@huawei.com>
      Reviewed-by: default avatarHyman Huang <yong.huang@smartx.com>
      Message-Id: <399861531e3b24a1ecea2ba453fb2c3d129fb03a.1693905328.git.gudkov.andrei@huawei.com>
      Signed-off-by: default avatarHyman Huang <yong.huang@smartx.com>
      320a6ccc
    • Andrei Gudkov's avatar
      migration/calc-dirty-rate: millisecond-granularity period · 34a68001
      Andrei Gudkov authored
      
      This patch allows to measure dirty page rate for
      sub-second intervals of time. An optional argument is
      introduced -- calc-time-unit. For example:
      {"execute": "calc-dirty-rate", "arguments":
        {"calc-time": 500, "calc-time-unit": "millisecond"} }
      
      Millisecond granularity allows to make predictions whether
      migration will succeed or not. To do this, calculate dirty
      rate with calc-time set to max allowed downtime (e.g. 300ms),
      convert measured rate into volume of dirtied memory,
      and divide by network throughput. If the value is lower
      than max allowed downtime, then migration will converge.
      
      Measurement results for single thread randomly writing to
      a 1/4/24GiB memory region:
      
      +----------------+-----------------------------------------------+
      | calc-time      |                dirty rate MiB/s               |
      | (milliseconds) +----------------+---------------+--------------+
      |                | theoretical    | page-sampling | dirty-bitmap |
      |                | (at 3M wr/sec) |               |              |
      +----------------+----------------+---------------+--------------+
      |                               1GiB                             |
      +----------------+----------------+---------------+--------------+
      |            100 |           6996 |          7100 |         3192 |
      |            200 |           4606 |          4660 |         2655 |
      |            300 |           3305 |          3280 |         2371 |
      |            400 |           2534 |          2525 |         2154 |
      |            500 |           2041 |          2044 |         1871 |
      |            750 |           1365 |          1341 |         1358 |
      |           1000 |           1024 |          1052 |         1025 |
      |           1500 |            683 |           678 |          684 |
      |           2000 |            512 |           507 |          513 |
      +----------------+----------------+---------------+--------------+
      |                               4GiB                             |
      +----------------+----------------+---------------+--------------+
      |            100 |          10232 |          8880 |         4070 |
      |            200 |           8954 |          8049 |         3195 |
      |            300 |           7889 |          7193 |         2881 |
      |            400 |           6996 |          6530 |         2700 |
      |            500 |           6245 |          5772 |         2312 |
      |            750 |           4829 |          4586 |         2465 |
      |           1000 |           3865 |          3780 |         2178 |
      |           1500 |           2694 |          2633 |         2004 |
      |           2000 |           2041 |          2031 |         1789 |
      +----------------+----------------+---------------+--------------+
      |                               24GiB                            |
      +----------------+----------------+---------------+--------------+
      |            100 |          11495 |          8640 |         5597 |
      |            200 |          11226 |          8616 |         3527 |
      |            300 |          10965 |          8386 |         2355 |
      |            400 |          10713 |          8370 |         2179 |
      |            500 |          10469 |          8196 |         2098 |
      |            750 |           9890 |          7885 |         2556 |
      |           1000 |           9354 |          7506 |         2084 |
      |           1500 |           8397 |          6944 |         2075 |
      |           2000 |           7574 |          6402 |         2062 |
      +----------------+----------------+---------------+--------------+
      
      Theoretical values are computed according to the following formula:
      size * (1 - (1-(4096/size))^(time*wps)) / (time * 2^20),
      where size is in bytes, time is in seconds, and wps is number of
      writes per second.
      
      Signed-off-by: default avatarAndrei Gudkov <gudkov.andrei@huawei.com>
      Reviewed-by: default avatarHyman Huang <yong.huang@smartx.com>
      Message-Id: <d802e6b8053eb60fbec1a784cf86f67d9528e0a8.1693895970.git.gudkov.andrei@huawei.com>
      Signed-off-by: default avatarHyman Huang <yong.huang@smartx.com>
      34a68001
  2. Oct 05, 2023
    • Stefan Hajnoczi's avatar
      Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging · 2f3913f4
      Stefan Hajnoczi authored
      
      virtio,pci: features, cleanups
      
      vdpa:
            shadow vq vlan support
            net migration with cvq
      cxl:
           support emulating 4 HDM decoders
           serial number extended capability
      virtio:
            hared dma-buf
      
      Fixes, cleanups all over the place.
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      
      * tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (53 commits)
        libvhost-user: handle shared_object msg
        vhost-user: add shared_object msg
        hw/display: introduce virtio-dmabuf
        util/uuid: add a hash function
        virtio: remove unused next argument from virtqueue_split_read_next_desc()
        virtio: remove unnecessary thread fence while reading next descriptor
        virtio: use shadow_avail_idx while checking number of heads
        libvhost-user.c: add assertion to vu_message_read_default
        pcie_sriov: unregister_vfs(): fix error path
        hw/i386/pc: improve physical address space bound check for 32-bit x86 systems
        amd_iommu: Fix APIC address check
        vdpa net: follow VirtIO initialization properly at cvq isolation probing
        vdpa net: stop probing if cannot set features
        vdpa net: fix error message setting virtio status
        hw/pci-bridge/cxl-upstream: Add serial number extended capability support
        hw/cxl: Support 4 HDM decoders at all levels of topology
        hw/cxl: Fix and use same calculation for HDM decoder block size everywhere
        hw/cxl: Add utility functions decoder interleave ways and target count.
        hw/cxl: Push cxl_decoder_count_enc() and cxl_decode_ig() into .c
        vdpa net: zero vhost_vdpa iova_tree pointer at cleanup
        ...
      
      Conflicts:
        hw/core/machine.c
        Context conflict with commit 314e0a84 ("hw/core: remove needless
        includes") because it removed an adjacent #include.
      2f3913f4
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-tcg-20231004' of https://gitlab.com/rth7680/qemu into staging · 800af0aa
      Stefan Hajnoczi authored
      accel: Introduce AccelClass::cpu_common_[un]realize
      accel: Target agnostic code movement
      accel/tcg: Cleanups to use CPUState instead of CPUArchState
      accel/tcg: Move CPUNegativeOffsetState into CPUState
      tcg: Split out tcg init functions to tcg/startup.h
      linux-user/hppa: Fix struct target_sigcontext layout
      build: Remove --enable-gprof
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmUdsL4dHHJpY2hhcmQu
      # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV/iYggAvDJEyMCAXSSH97BA
      # wZT/2D/MFIhOMk6xrQRnrXfrG70N0iVKz44jl9j7k1D+9BOHcso//DDJH3c96k9A
      # MgDb6W2bsWvC15/Qw6BALf5bb/II0MJuCcQvj3CNX5lNkXAWhwIOBhsZx7V9ST1+
      # rihN4nowpRWdV5GeCjDGaJW455Y1gc96hICYHy6Eqw1cUgUFt9vm5aYU3FHlat29
      # sYRaVYKUL2hRUPPNcPiPq0AaJ8wN6/s8gT+V1UvTzkhHqskoM4ZU89RchuXVoq1h
      # SvhKElyULMRzM7thWtpW8qYJPj4mxZsKArESvHjsunGD6KEz3Fh1sy6EKRcdmpG/
      # II1vkg==
      # =k2Io
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Wed 04 Oct 2023 14:36:46 EDT
      # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
      # gpg:                issuer "richard.henderson@linaro.org"
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * tag 'pull-tcg-20231004' of https://gitlab.com/rth7680/qemu
      
      : (47 commits)
        tcg/loongarch64: Fix buid error
        tests/avocado: Re-enable MIPS Malta tests (GitLab issue #1884 fixed)
        build: Remove --enable-gprof
        linux-user/hppa: Fix struct target_sigcontext layout
        tcg: Split out tcg init functions to tcg/startup.h
        tcg: Remove argument to tcg_prologue_init
        accel/tcg: Make cpu-exec-common.c a target agnostic unit
        accel/tcg: Make icount.o a target agnostic unit
        accel/tcg: Make monitor.c a target-agnostic unit
        accel/tcg: Rename target-specific 'internal.h' -> 'internal-target.h'
        exec: Rename target specific page-vary.c -> page-vary-target.c
        exec: Rename cpu.c -> cpu-target.c
        accel: Rename accel-common.c -> accel-target.c
        accel: Make accel-blocker.o target agnostic
        accel/tcg: Restrict dump_exec_info() declaration
        exec: Move cpu_loop_foo() target agnostic functions to 'cpu-common.h'
        exec: Make EXCP_FOO definitions target agnostic
        accel/tcg: move ld/st helpers to ldst_common.c.inc
        accel/tcg: Unify user and softmmu do_[st|ld]*_mmu()
        accel/tcg: Remove env_tlb()
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      800af0aa
  3. Oct 04, 2023
Loading