[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 10/24] numa: mirror cpu to node ma
From: |
Andrew Jones |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 10/24] numa: mirror cpu to node mapping in MachineState::possible_cpus |
Date: |
Fri, 5 May 2017 13:47:47 +0200 |
User-agent: |
Mutt/1.6.0.1 (2016-04-01) |
On Fri, May 05, 2017 at 01:28:26PM +0200, Igor Mammedov wrote:
> On Thu, 4 May 2017 13:40:18 +0200
> Andrew Jones <address@hidden> wrote:
>
> [...]
> > > +void machine_set_cpu_numa_node(MachineState *machine,
> > > + CpuInstanceProperties *props, Error
> > > **errp)
> > > +{
> [...]
>
> > > + }
> > > +
> > > + /* skip slots with explicit mismatch */
> > > + if (props->has_thread_id && props->thread_id !=
> > > slot->props.thread_id) {
> > > + continue;
> > > + }
> > > +
> > > + if (props->has_core_id && props->core_id != slot->props.core_id)
> > > {
> > > + continue;
> > > + }
> > > +
> > > + if (props->has_socket_id && props->socket_id !=
> > > slot->props.socket_id) {
> > > + continue;
> > > + }
> >
> > nit: above 3 if-conditions could be condensed into 1 compound condition
> this reduces number of lines but result is a bit ugly due to 80chr/line limit:
>
> /* skip slots with explicit mismatch */
>
> if ((props->has_thread_id &&
>
> props->thread_id != slot->props.thread_id) ||
>
> (props->has_core_id && props->core_id != slot->props.core_id) ||
>
> (props->has_socket_id && props->socket_id !=
> slot->props.socket_id)
> ) {
>
> continue;
>
> }
>
> do you still want the change?
If only we could kill the 80 char limit! I don't feel strongly about any
of this stuff, and you've already got my R-b either way.
Thanks,
drew
>
>
>
>
[Qemu-ppc] [PATCH v2 11/24] numa: do default mapping based on possible_cpus instead of node_cpu bitmaps, Igor Mammedov, 2017/05/03
[Qemu-ppc] [PATCH v2 13/24] pc: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu(), Igor Mammedov, 2017/05/03
[Qemu-ppc] [PATCH v2 14/24] spapr: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu(), Igor Mammedov, 2017/05/03
[Qemu-ppc] [PATCH v2 15/24] virt-arm: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu(), Igor Mammedov, 2017/05/03
[Qemu-ppc] [PATCH v2 12/24] numa: add numa_[has_]node_id() wrappers, Igor Mammedov, 2017/05/03