|
From: | Christian Borntraeger |
Subject: | Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux |
Date: | Thu, 11 Aug 2022 15:54:17 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 |
Am 11.08.22 um 14:27 schrieb Daniel P. Berrangé: [...]
--- a/qemu-options.hx +++ b/qemu-options.hx @@ -4743,6 +4743,23 @@ HXCOMM Internal use DEF("qtest", HAS_ARG, QEMU_OPTION_qtest, "", QEMU_ARCH_ALL) DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, "", QEMU_ARCH_ALL)+#ifdef __linux__+DEF("async-teardown", 0, QEMU_OPTION_asyncteardown, + "-async-teardown enable asynchronous teardown\n", + QEMU_ARCH_ALL) +#endif +SRST +``-async-teardown`` + Enable asynchronous teardown. A new teardown process will be + created at startup, using clone. The teardown process will share + the address space of the main qemu process, and wait for the main + process to terminate. At that point, the teardown process will + also exit. This allows qemu to terminate quickly if the guest was + huge, leaving the teardown of the address space to the teardown + process. Since the teardown process shares the same cgroups as the + main qemu process, accounting is performed correctly. +ERST + DEF("msg", HAS_ARG, QEMU_OPTION_msg, "-msg [timestamp[=on|off]][,guest-name=[on|off]]\n" " control error message format\n"It occurrs to me that we've got a general goal of getting away from adding new top level command line arguments. Most of the time there's an obvious existing place to put them, but I'm really not sure where this particular option would fit ? it isn't tied to any aspect of the VM backend configuration nor hardware frontends. The closest match is the lifecycle action option (-no-shutdown) which were merged into a -action arg, but even that's a bit of a stretch. Markus/Paolo: do you have suggestions ?
Also extending this to libvirt, would it make sense to add this to the event list <on_poweroff> <on_reboot> <on_crash> <on_lockfailure> as <on_teardown> with async/sync This might give an indication where to put it in qemu.
[Prev in Thread] | Current Thread | [Next in Thread] |