[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 09/24] numa: add check that board supports cp
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH v2 09/24] numa: add check that board supports cpu_index to node mapping |
Date: |
Wed, 3 May 2017 18:19:50 +0200 |
On Wed, 3 May 2017 12:04:29 -0300
Eduardo Habkost <address@hidden> wrote:
> On Wed, May 03, 2017 at 02:57:03PM +0200, Igor Mammedov wrote:
> > Default node mapping initialization already checks that board
> > supports cpu_index to node mapping and refuses to start if
> > it's not supported. Do the same for explicitly provided
> > mapping "-numa node,cpus=..."
> >
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> > numa.c | 13 ++++++++++---
> > 1 file changed, 10 insertions(+), 3 deletions(-)
> >
> > diff --git a/numa.c b/numa.c
> > index ab1661d..b517870 100644
> > --- a/numa.c
> > +++ b/numa.c
> > @@ -140,10 +140,12 @@ uint32_t numa_get_node(ram_addr_t addr, Error **errp)
> > return -1;
> > }
> >
> > -static void numa_node_parse(NumaNodeOptions *node, QemuOpts *opts, Error
> > **errp)
> > +static void numa_node_parse(MachineState *ms, NumaNodeOptions *node,
> > + QemuOpts *opts, Error **errp)
> > {
> > uint16_t nodenr;
> > uint16List *cpus = NULL;
> > + MachineClass *mc = MACHINE_GET_CLASS(ms);
> >
> > if (node->has_nodeid) {
> > nodenr = node->nodeid;
> > @@ -162,6 +164,10 @@ static void numa_node_parse(NumaNodeOptions *node,
> > QemuOpts *opts, Error **errp)
> > return;
> > }
> >
> > + if (!mc->cpu_index_to_instance_props) {
> > + error_report("CPUs to NUMA node mapping isn't supported");
> > + exit(1);
> > + }
>
> The error message sounds very confusing me. Maybe this could
> become just: "NUMA is not supported by the %s machine-type"?
If I replace this specific error message with a generic one and do
the same in 5/24, it will be harder for us/user to figure out
where exactly error happened.
Would be following clearer:
"option -numa node,cpus= is not supported by the %s machine-type"
- [Qemu-devel] [PATCH v2 06/24] spapr: add node-id property to sPAPR core, (continued)
[Qemu-devel] [PATCH v2 07/24] pc: add node-id property to CPU, Igor Mammedov, 2017/05/03
[Qemu-devel] [PATCH v2 09/24] numa: add check that board supports cpu_index to node mapping, Igor Mammedov, 2017/05/03
Re: [Qemu-devel] [PATCH v2 09/24] numa: add check that board supports cpu_index to node mapping, Andrew Jones, 2017/05/04
Re: [Qemu-devel] [PATCH v2 09/24] numa: add check that board supports cpu_index to node mapping, David Gibson, 2017/05/04
[Qemu-devel] [PATCH v2 10/24] numa: mirror cpu to node mapping in MachineState::possible_cpus, Igor Mammedov, 2017/05/03