From: Peter Xu <peterx@redhat.com>
To: huangy81@chinatelecom.cn
Cc: "Juan Quintela" <quintela@redhat.com>,
"Markus ArmBruster" <armbru@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
qemu-devel <qemu-devel@nongnu.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU
Date: Mon, 6 Dec 2021 16:39:32 +0800 [thread overview]
Message-ID: <Ya3MROP77Uibicmn@xz-m1.local> (raw)
In-Reply-To: <9cc3cc5377e4330cbe0e87e89f452889516a4c09.1638495274.git.huangy81@chinatelecom.cn>
On Fri, Dec 03, 2021 at 09:39:47AM +0800, huangy81@chinatelecom.cn wrote:
> +void dirtylimit_setup(int max_cpus)
> +{
> + if (!kvm_enabled() || !kvm_dirty_ring_enabled()) {
> + return;
> + }
> +
> + dirtylimit_calc_state_init(max_cpus);
> + dirtylimit_state_init(max_cpus);
> +}
[...]
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 620a1f1..0f83ce3 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -3777,5 +3777,6 @@ void qemu_init(int argc, char **argv, char **envp)
> qemu_init_displays();
> accel_setup_post(current_machine);
> os_setup_post();
> + dirtylimit_setup(current_machine->smp.max_cpus);
> resume_mux_open();
Can we do the init only when someone enables it? We could also do proper
free() for the structs when it's globally turned off.
--
Peter Xu
next prev parent reply other threads:[~2021-12-06 8:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 1:39 [PATCH v9 0/3] support dirty restraint on vCPU huangy81
2021-12-03 1:39 ` [PATCH v9 1/3] migration/dirtyrate: implement vCPU dirtyrate calculation periodically huangy81
2021-12-06 10:18 ` Peter Xu
2021-12-06 15:36 ` Hyman
2021-12-03 1:39 ` [PATCH v9 2/3] cpu-throttle: implement vCPU throttle huangy81
2021-12-06 10:10 ` Peter Xu
2021-12-08 15:36 ` Hyman
2021-12-08 15:50 ` Hyman
2021-12-03 1:39 ` [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU huangy81
2021-12-03 12:34 ` Markus Armbruster
2021-12-04 12:00 ` Hyman Huang
2021-12-06 8:28 ` Peter Xu
2021-12-06 14:56 ` Hyman
2021-12-07 2:24 ` Peter Xu
2021-12-07 4:32 ` Hyman
2021-12-06 8:36 ` Peter Xu
2021-12-06 15:19 ` Hyman
2021-12-07 2:57 ` Peter Xu
2021-12-07 4:38 ` Hyman
2021-12-06 8:39 ` Peter Xu [this message]
2021-12-06 15:22 ` Hyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ya3MROP77Uibicmn@xz-m1.local \
--to=peterx@redhat.com \
--cc=armbru@redhat.com \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=huangy81@chinatelecom.cn \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).