From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: "Like Xu" <like.xu@linux.intel.com>,
qemu-trivial@nongnu.org, qemu-devel@nongnu.org,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
like.xu@intel.com
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 2/9] cpu/topology: add general support for machine properties
Date: Thu, 4 Apr 2019 17:21:28 +0100 [thread overview]
Message-ID: <20190404162128.GF2678@work-vm> (raw)
In-Reply-To: <20190404162555.0a2267ee@redhat.com>
* Igor Mammedov (imammedo@redhat.com) wrote:
> On Fri, 29 Mar 2019 16:48:38 +0800
> Like Xu <like.xu@linux.intel.com> wrote:
>
> > Signed-off-by: Like Xu <like.xu@linux.intel.com>
> > ---
<snipp>
> > diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
> > index e2aa57a..ae92f6e 100644
> > --- a/migration/postcopy-ram.c
> > +++ b/migration/postcopy-ram.c
> > @@ -29,6 +29,7 @@
> > #include "sysemu/balloon.h"
> > #include "qemu/error-report.h"
> > #include "trace.h"
> > +#include "hw/boards.h"
> >
> > /* Arbitrary limit on size of each discard command,
> > * keeps them around ~200 bytes
> > @@ -128,6 +129,8 @@ static void migration_exit_cb(Notifier *n, void *data)
> >
> > static struct PostcopyBlocktimeContext *blocktime_context_new(void)
> > {
> > + MachineState *ms = MACHINE(qdev_get_machine());
> > + unsigned int smp_cpus = ms->topo.smp_cpus;
> > PostcopyBlocktimeContext *ctx = g_new0(PostcopyBlocktimeContext, 1);
> > ctx->page_fault_vcpu_time = g_new0(uint32_t, smp_cpus);
> > ctx->vcpu_addr = g_new0(uintptr_t, smp_cpus);
> > @@ -141,6 +144,8 @@ static struct PostcopyBlocktimeContext *blocktime_context_new(void)
> >
> > static uint32List *get_vcpu_blocktime_list(PostcopyBlocktimeContext *ctx)
> > {
> > + MachineState *ms = MACHINE(qdev_get_machine());
> > + unsigned int smp_cpus = ms->topo.smp_cpus;
> > uint32List *list = NULL, *entry = NULL;
> > int i;
> >
> > @@ -806,8 +811,10 @@ static void mark_postcopy_blocktime_begin(uintptr_t addr, uint32_t ptid,
> > static void mark_postcopy_blocktime_end(uintptr_t addr)
> > {
> > MigrationIncomingState *mis = migration_incoming_get_current();
> > + MachineState *ms = MACHINE(qdev_get_machine());
> > PostcopyBlocktimeContext *dc = mis->blocktime_ctx;
> > int i, affected_cpu = 0;
> > + unsigned int smp_cpus = ms->topo.smp_cpus;
> > bool vcpu_total_blocktime = false;
> > uint32_t read_vcpu_time, low_time_offset;
>
> I don't know enough about migration to say some thing useful here,
> CCin David for comments.
I think that's OK; we just need to know the total number of vcpus; this
thing calculates some stats based on the number of the vCPUs that are
blocked by postcopy page waits, and in particular if everyone is
blocked.
(I'd slightly prefer macs there rather than ms, just because we tend to
use ms in migration for MigrationState sometimes, but not always).
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2019-04-04 16:21 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 8:48 [Qemu-trivial] [Qemu-devel] [PATCH 0/9] refactor cpu topo into machine properties Like Xu
2019-03-29 8:48 ` [Qemu-trivial] [Qemu-devel] [PATCH 1/9] cpu/topology: add struct CpuTopology to MachineState Like Xu
2019-03-29 9:22 ` Alex Bennée
2019-04-01 2:07 ` Like Xu
2019-04-04 11:37 ` Igor Mammedov
2019-03-29 8:48 ` [Qemu-trivial] [Qemu-devel] [PATCH 2/9] cpu/topology: add general support for machine properties Like Xu
2019-04-04 14:25 ` Igor Mammedov
2019-04-04 16:21 ` Dr. David Alan Gilbert [this message]
2019-04-30 7:30 ` Like Xu
2019-05-02 15:09 ` Igor Mammedov
2019-05-03 1:08 ` Eduardo Habkost
2019-05-03 1:01 ` Eduardo Habkost
2019-03-29 8:48 ` [Qemu-trivial] [Qemu-devel] [PATCH 3/9] cpu/topology: add uncommon arch support for smp " Like Xu
2019-04-08 12:54 ` Igor Mammedov
2019-04-16 8:47 ` Like Xu
2019-04-16 12:00 ` Igor Mammedov
2019-03-29 8:48 ` [Qemu-trivial] [Qemu-devel] [PATCH 4/9] cpu/topology: add ARM " Like Xu
2019-03-29 9:27 ` Alex Bennée
2019-03-29 11:20 ` Philippe Mathieu-Daudé
2019-04-01 2:27 ` Like Xu
2019-04-01 2:56 ` Like Xu
2019-04-01 23:38 ` Eduardo Habkost
2019-04-02 2:35 ` Like Xu
2019-04-02 4:45 ` Peter Maydell
2019-04-02 5:20 ` Like Xu
2019-04-02 5:27 ` Peter Maydell
2019-04-08 13:11 ` Igor Mammedov
2019-03-29 8:48 ` [Qemu-trivial] [Qemu-devel] [PATCH 5/9] cpu/topology: add i386 " Like Xu
2019-03-29 8:48 ` [Qemu-trivial] [Qemu-devel] [PATCH 6/9] cpu/topology: add PPC " Like Xu
2019-03-29 8:48 ` [Qemu-trivial] [Qemu-devel] [PATCH 7/9] cpu/topology: add riscv " Like Xu
[not found] ` <CAKmqyKPqKqdBpeyJMbrZq3b2pe5V-yHJAsNDugOEWrdKr0buqg@mail.gmail.com>
2019-04-01 2:10 ` Like Xu
2019-03-29 8:48 ` [Qemu-trivial] [Qemu-devel] [PATCH 8/9] cpu/topology: add s390x " Like Xu
2019-03-29 8:48 ` [Qemu-trivial] [Qemu-devel] [PATCH 9/9] cpu/topology: replace smp global variables with machine propertie Like Xu
2019-03-29 9:07 ` [Qemu-trivial] [Qemu-devel] [PATCH 0/9] refactor cpu topo into machine properties no-reply
2019-03-29 10:21 ` Igor Mammedov
2019-04-04 3:26 ` Like Xu
2019-04-08 13:26 ` Igor Mammedov
2019-04-08 14:38 ` Like Xu
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=20190404162128.GF2678@work-vm \
--to=dgilbert@redhat.com \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=like.xu@intel.com \
--cc=like.xu@linux.intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.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).