qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] f759d7: migration: remove the QEMUFileOps 'ge


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] f759d7: migration: remove the QEMUFileOps 'get_buffer' cal...
Date: Thu, 23 Jun 2022 06:01:06 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: f759d7050bd0ec34f45bc0d91800625a6938e203
      
https://github.com/qemu/qemu/commit/f759d7050bd0ec34f45bc0d91800625a6938e203
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M migration/qemu-file-channel.c
    M migration/qemu-file.c
    M migration/qemu-file.h

  Log Message:
  -----------
  migration: remove the QEMUFileOps 'get_buffer' callback

This directly implements the get_buffer logic using QIOChannel APIs.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
  dgilbert: Fixup len = *-*EIO as spotted by Peter Xu


  Commit: ec2135eec80dc0bd4089d8af2db28c386fadc558
      
https://github.com/qemu/qemu/commit/ec2135eec80dc0bd4089d8af2db28c386fadc558
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M migration/qemu-file-channel.c
    M migration/qemu-file.c
    M migration/qemu-file.h

  Log Message:
  -----------
  migration: remove the QEMUFileOps 'writev_buffer' callback

This directly implements the writev_buffer logic using QIOChannel APIs.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 02bdbe172da51ae2189d8c6035c3aeb3788b553f
      
https://github.com/qemu/qemu/commit/02bdbe172da51ae2189d8c6035c3aeb3788b553f
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M migration/qemu-file-channel.c
    M migration/qemu-file.c
    M migration/qemu-file.h

  Log Message:
  -----------
  migration: remove the QEMUFileOps 'get_return_path' callback

This directly implements the get_return_path logic using QIOChannel APIs.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 77ef2dc1c8c6a482fd06fdf3b59d0647f0850e3e
      
https://github.com/qemu/qemu/commit/77ef2dc1c8c6a482fd06fdf3b59d0647f0850e3e
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M migration/channel.c
    M migration/colo.c
    M migration/meson.build
    M migration/migration.c
    R migration/qemu-file-channel.c
    R migration/qemu-file-channel.h
    M migration/qemu-file.c
    M migration/qemu-file.h
    M migration/ram.c
    M migration/rdma.c
    M migration/savevm.c
    M tests/unit/test-vmstate.c

  Log Message:
  -----------
  migration: remove the QEMUFileOps abstraction

Now that all QEMUFile callbacks are removed, the entire concept can be
deleted.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: df00f622dd063b36e28b37a00da45eb924205e58
      
https://github.com/qemu/qemu/commit/df00f622dd063b36e28b37a00da45eb924205e58
  Author: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M accel/kvm/kvm-all.c

  Log Message:
  -----------
  accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping

Add a non-required argument 'CPUState' to kvm_dirty_ring_reap so
that it can cover single vcpu dirty-ring-reaping scenario.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: 
<bc37b83d5a189add887433728a0f632d35fb3e3e.1652931128.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: b2090d88699fd82dee9f35f98ad0033301f6bb36
      
https://github.com/qemu/qemu/commit/b2090d88699fd82dee9f35f98ad0033301f6bb36
  Author: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M cpus-common.c
    M include/exec/cpu-common.h

  Log Message:
  -----------
  cpus: Introduce cpu_list_generation_id

Introduce cpu_list_generation_id to track cpu list generation so
that cpu hotplug/unplug can be detected during measurement of
dirty page rate.

cpu_list_generation_id could be used to detect changes of cpu
list, which is prepared for dirty page rate measurement.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: 
<4d7a5f2c86066839054282b1c224067d89d32fc1.1652931128.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 825ccd7c78f22dab8bdd52aa1e22c1dc9684959b
      
https://github.com/qemu/qemu/commit/825ccd7c78f22dab8bdd52aa1e22c1dc9684959b
  Author: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    A include/sysemu/dirtyrate.h
    M migration/dirtyrate.c
    M migration/dirtyrate.h

  Log Message:
  -----------
  migration/dirtyrate: Refactor dirty page rate calculation

abstract out dirty log change logic into function
global_dirty_log_change.

abstract out dirty page rate calculation logic via
dirty-ring into function vcpu_calculate_dirtyrate.

abstract out mathematical dirty page rate calculation
into do_calculate_dirtyrate, decouple it from DirtyStat.

rename set_sample_page_period to dirty_stat_wait, which
is well-understood and will be reused in dirtylimit.

handle cpu hotplug/unplug scenario during measurement of
dirty page rate.

export util functions outside migration.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: 
<1d65b53c19cfc7dca0114422129515055fa18fb8.1652931128.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: dde6b67d0ee86f832fb8a1afd7ea296b847ec4e1
      
https://github.com/qemu/qemu/commit/dde6b67d0ee86f832fb8a1afd7ea296b847ec4e1
  Author: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M include/exec/memory.h
    A include/sysemu/dirtylimit.h
    A softmmu/dirtylimit.c
    M softmmu/meson.build

  Log Message:
  -----------
  softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically

Introduce the third method GLOBAL_DIRTY_LIMIT of dirty
tracking for calculate dirtyrate periodly for dirty page
rate limit.

Add dirtylimit.c to implement dirtyrate calculation periodly,
which will be used for dirty page rate limit.

Add dirtylimit.h to export util functions for dirty page rate
limit implementation.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: 
<69a2287b9bf98a4a3d967e01091cb8f6bf80ead4.1652931128.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 6cc7632a6ad77b0ff77a7697e6079ffe18c204dc
      
https://github.com/qemu/qemu/commit/6cc7632a6ad77b0ff77a7697e6079ffe18c204dc
  Author: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M accel/kvm/kvm-all.c
    M accel/stubs/kvm-stub.c
    M include/sysemu/kvm.h

  Log Message:
  -----------
  accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function

Introduce kvm_dirty_ring_size util function to help calculate
dirty ring ful time.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Acked-by: Peter Xu <peterx@redhat.com>
Message-Id: 
<c99e7851c2e2b99312cfbabe4d1f6379a3da8a44.1652931128.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
  dgilbert: Fixed up excess #endif


  Commit: 1e682efa0e7552ff809917cb0632ed17ed55a69b
      
https://github.com/qemu/qemu/commit/1e682efa0e7552ff809917cb0632ed17ed55a69b
  Author: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M accel/kvm/kvm-all.c
    M include/hw/core/cpu.h
    M include/sysemu/dirtylimit.h
    M softmmu/dirtylimit.c
    M softmmu/trace-events

  Log Message:
  -----------
  softmmu/dirtylimit: Implement virtual CPU throttle

Setup a negative feedback system when vCPU thread
handling KVM_EXIT_DIRTY_RING_FULL exit by introducing
throttle_us_per_full field in struct CPUState. Sleep
throttle_us_per_full microseconds to throttle vCPU
if dirtylimit is in service.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: 
<ec26c4bc4874b2c72141a98b028b431404975219.1652931128.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: c51f4a3c2bdddc8fb5e7e25836dc1f11945d8d19
      
https://github.com/qemu/qemu/commit/c51f4a3c2bdddc8fb5e7e25836dc1f11945d8d19
  Author: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M hmp-commands-info.hx
    M hmp-commands.hx
    M include/monitor/hmp.h
    M qapi/migration.json
    M softmmu/dirtylimit.c
    M tests/qtest/qmp-cmd-test.c

  Log Message:
  -----------
  softmmu/dirtylimit: Implement dirty page rate limit

Implement dirtyrate calculation periodically basing on
dirty-ring and throttle virtual CPU until it reachs the quota
dirty page rate given by user.

Introduce qmp commands "set-vcpu-dirty-limit",
"cancel-vcpu-dirty-limit", "query-vcpu-dirty-limit"
to enable, disable, query dirty page limit for virtual CPU.

Meanwhile, introduce corresponding hmp commands
"set_vcpu_dirty_limit", "cancel_vcpu_dirty_limit",
"info vcpu_dirty_limit" so the feature can be more usable.

"query-vcpu-dirty-limit" success depends on enabling dirty
page rate limit, so just add it to the list of skipped
command to ensure qmp-cmd-test run successfully.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Acked-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: 
<80195172e377e3d96394b5b94425098260380bfa.1652931128.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 5df0eaff8e24223974bf2516e6dc773695603017
      
https://github.com/qemu/qemu/commit/5df0eaff8e24223974bf2516e6dc773695603017
  Author: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests: Add dirty page rate limit test

Add dirty page rate limit test if kernel support dirty ring.

The following qmp commands are covered by this test case:
"calc-dirty-rate", "query-dirty-rate", "set-vcpu-dirty-limit",
"cancel-vcpu-dirty-limit" and "query-vcpu-dirty-limit".

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Acked-by: Peter Xu <peterx@redhat.com>
Message-Id: 
<81ecb7b473d8ee2adf414a1f69ce8b7bd678c558.1652931128.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 9ca25e8cc5480e6918bb6e032f6b0c50bcf99f46
      
https://github.com/qemu/qemu/commit/9ca25e8cc5480e6918bb6e032f6b0c50bcf99f46
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M accel/kvm/kvm-all.c
    M accel/stubs/kvm-stub.c
    M cpus-common.c
    M hmp-commands-info.hx
    M hmp-commands.hx
    M include/exec/cpu-common.h
    M include/exec/memory.h
    M include/hw/core/cpu.h
    A include/io/channel-null.h
    M include/monitor/hmp.h
    A include/sysemu/dirtylimit.h
    A include/sysemu/dirtyrate.h
    M include/sysemu/kvm.h
    A io/channel-null.c
    M io/channel-socket.c
    M io/meson.build
    M io/trace-events
    M migration/block.c
    A migration/channel-block.c
    A migration/channel-block.h
    M migration/channel.c
    M migration/colo.c
    M migration/dirtyrate.c
    M migration/dirtyrate.h
    M migration/meson.build
    M migration/migration.c
    M migration/multifd.c
    R migration/qemu-file-channel.c
    R migration/qemu-file-channel.h
    M migration/qemu-file.c
    M migration/qemu-file.h
    M migration/ram.c
    M migration/rdma.c
    M migration/savevm.c
    M migration/vmstate.c
    M monitor/hmp-cmds.c
    M qapi/migration.json
    A softmmu/dirtylimit.c
    M softmmu/meson.build
    M softmmu/trace-events
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c
    M tests/qtest/qmp-cmd-test.c
    M tests/unit/meson.build
    A tests/unit/test-io-channel-null.c
    M tests/unit/test-vmstate.c

  Log Message:
  -----------
  Merge tag 'pull-migration-20220623a' of https://gitlab.com/dagrh/qemu into 
staging

Migration pull 2022-06-23

This replaces my pull from yesterday, and Juan's from the day before.

Compared to my pull eysterday:
  A one character fix in get_buffer patch spotted by Peter Xu

Compared to Juan's pull:
  a) Hopefully fixed non-Linux builds
    (Local build test on mingw64 works
    Note: the zero-copy capability is now
    defined on non-Linux systems)
  b) Added Hyman's series - it had been
    on queue for a while (sorry for the delay)

In this today migration PULL request:
- Dainiel Berrangé - qemufileops cleanup
- Leonardo Bras  - cleanups for zero copy
- Juan Quintela  - RDMA cleanups
- Hyman Huang - per-vcpu dirty ring work

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEERfXHG0oMt/uXep+pBRYzHrxb/ecFAmK0McwACgkQBRYzHrxb
# /eeR4hAAo2Fb8Khusi+29efjEmoRhhyBcSfd7Oqnv6JD4E7hIK1sS0XkMwAy6PYM
# cgVes+CHTstSZX1STlSp+3jUpCLDRdtlyPB08LddwjEfbCBpGGR9D4L/JZuITEnN
# tnARzSwtTPy4Dpu5aM3t74CvbtipEdKWfQ429QLQY3y9mzWFvbED0QCHEINw429J
# dRNI3ZwXvQfog0P0U90QVSrhUrMMLx/1Gv0oJnFLhGZeV2kVgTgp2b1RTBoZXoSp
# VK5HwRv3kEZfS+09W0ix9DJwKa4eqXPgiTWEEIvuNjVeVkdPAcb8EU9qH6Ln0F9F
# bhg4VDzwhRvYVQJhhLt4j/Z2LJTYel39W+zH4PESLEmlLP4CQOhB3zEcNcbpGf5W
# EFie9v+cu+oZvyidOmvV/JOYpXCEi6l1wWJ+/C6jIQ/D+eBWZ1q+vAUyXf3/m6aG
# mYMR69w8EbmliysvY2MkRSoqmRTrMxve+ERbqn1nTbJY6VD+Fpj91OZ41TL//3Y9
# aSa2U4jUZmSSA/zY+WVOibe24eP1VKhfpOlBpYPtvadbKC7luC7rZu2AYfKcP0uB
# 4x6VPgp3gIgOmfR8dqLzDdqQbSg/Oe9mfKoXeUbeHzZWJzamG+9igKPYcf2Yv2EE
# t5++9cicVtrcf+oFzyVI+PTe1bH3pwKdnkJb91NEFUs0ZtThlcg=
# =dHmE
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 23 Jun 2022 02:26:36 AM PDT
# gpg:                using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" 
[full]

* tag 'pull-migration-20220623a' of https://gitlab.com/dagrh/qemu: (33 commits)
  tests: Add dirty page rate limit test
  softmmu/dirtylimit: Implement dirty page rate limit
  softmmu/dirtylimit: Implement virtual CPU throttle
  accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function
  softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically
  migration/dirtyrate: Refactor dirty page rate calculation
  cpus: Introduce cpu_list_generation_id
  accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping
  migration: remove the QEMUFileOps abstraction
  migration: remove the QEMUFileOps 'get_return_path' callback
  migration: remove the QEMUFileOps 'writev_buffer' callback
  migration: remove the QEMUFileOps 'get_buffer' callback
  migration: remove the QEMUFileOps 'close' callback
  migration: remove the QEMUFileOps 'set_blocking' callback
  migration: remove the QEMUFileOps 'shut_down' callback
  migration: remove unused QEMUFileGetFD typedef / qemu_get_fd method
  migration: introduce new constructors for QEMUFile
  migration: hardcode assumption that QEMUFile is backed with QIOChannel
  migration: stop passing 'opaque' parameter to QEMUFile hooks
  migration: convert savevm to use QIOChannelBlock for VMState
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/b1b0c16f144a...9ca25e8cc548



reply via email to

[Prev in Thread] Current Thread [Next in Thread]