qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] numa: stop abusing numa_mem_supported
@ 2019-12-12 12:48 Igor Mammedov
  2019-12-12 12:48 ` [PATCH 1/2] numa: remove not needed check Igor Mammedov
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Igor Mammedov @ 2019-12-12 12:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: Tao Xu, Eduardo Habkost

A fix  and cleanup for a mistakes that slipped by me in
  aa57020774 (numa: move numa global variable nb_numa_nodes into MachineState)


CC: Eduardo Habkost <ehabkost@redhat.com>
CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
CC: Tao Xu <tao3.xu@intel.com>

Igor Mammedov (2):
  numa: remove not needed check
  numa: properly check if numa is supported

 hw/arm/sbsa-ref.c | 1 -
 hw/core/machine.c | 4 ++--
 hw/core/numa.c    | 7 +------
 3 files changed, 3 insertions(+), 9 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/2] numa: remove not needed check
  2019-12-12 12:48 [PATCH 0/2] numa: stop abusing numa_mem_supported Igor Mammedov
@ 2019-12-12 12:48 ` Igor Mammedov
  2019-12-19 17:45   ` Eduardo Habkost
  2019-12-12 12:48 ` [PATCH 2/2] numa: properly check if numa is supported Igor Mammedov
  2019-12-19 13:28 ` [PATCH 0/2] numa: stop abusing numa_mem_supported Igor Mammedov
  2 siblings, 1 reply; 13+ messages in thread
From: Igor Mammedov @ 2019-12-12 12:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: Tao Xu, Eduardo Habkost

Currently parse_numa_node() is always called from already numa
enabled context.
Drop unnecessary check if numa is supported.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/core/numa.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/hw/core/numa.c b/hw/core/numa.c
index e3332a9..19f082d 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -83,10 +83,6 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
         return;
     }
 
-    if (!mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id) {
-        error_setg(errp, "NUMA is not supported by this machine-type");
-        return;
-    }
     for (cpus = node->cpus; cpus; cpus = cpus->next) {
         CpuInstanceProperties props;
         if (cpus->value >= max_cpus) {
@@ -178,9 +174,8 @@ void parse_numa_distance(MachineState *ms, NumaDistOptions *dist, Error **errp)
 void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp)
 {
     Error *err = NULL;
-    MachineClass *mc = MACHINE_GET_CLASS(ms);
 
-    if (!mc->numa_mem_supported) {
+    if (!ms->numa_state) {
         error_setg(errp, "NUMA is not supported by this machine-type");
         goto end;
     }
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/2] numa: properly check if numa is supported
  2019-12-12 12:48 [PATCH 0/2] numa: stop abusing numa_mem_supported Igor Mammedov
  2019-12-12 12:48 ` [PATCH 1/2] numa: remove not needed check Igor Mammedov
@ 2019-12-12 12:48 ` Igor Mammedov
  2019-12-13  1:33   ` Tao Xu
  2019-12-19 17:57   ` Eduardo Habkost
  2019-12-19 13:28 ` [PATCH 0/2] numa: stop abusing numa_mem_supported Igor Mammedov
  2 siblings, 2 replies; 13+ messages in thread
From: Igor Mammedov @ 2019-12-12 12:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Radoslaw Biernacki, Eduardo Habkost, Tao Xu,
	qemu-stable, Leif Lindholm, qemu-arm

Commit aa57020774b, by mistake used MachineClass::numa_mem_supported
to check if NUMA is supported by machine and also as unrelated change
set it to true for sbsa-ref board.

Luckily change didn't break machines that support NUMA, as the field
is set to true for them.

But the field is not intended for checking if NUMA is supported and
will be flipped to false within this release for new machine types.

Fix it:
 - by using previously used condition
      !mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id
   the first time and then use MachineState::numa_state down the road
   to check if NUMA is supported
 - dropping stray sbsa-ref chunk

Fixes: aa57020774b690a22be72453b8e91c9b5a68c516
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
CC: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
CC: Peter Maydell <peter.maydell@linaro.org>
CC: Leif Lindholm <leif.lindholm@linaro.org>
CC: qemu-arm@nongnu.org
CC: qemu-stable@nongnu.org


 hw/arm/sbsa-ref.c | 1 -
 hw/core/machine.c | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 27046cc..c6261d4 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -791,7 +791,6 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
     mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids;
     mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props;
     mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id;
-    mc->numa_mem_supported = true;
 }
 
 static const TypeInfo sbsa_ref_info = {
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 1689ad3..aa63231 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -958,7 +958,7 @@ static void machine_initfn(Object *obj)
                                         NULL);
     }
 
-    if (mc->numa_mem_supported) {
+    if (mc->cpu_index_to_instance_props && mc->get_default_cpu_node_id) {
         ms->numa_state = g_new0(NumaState, 1);
     }
 
@@ -1102,7 +1102,7 @@ void machine_run_board_init(MachineState *machine)
 {
     MachineClass *machine_class = MACHINE_GET_CLASS(machine);
 
-    if (machine_class->numa_mem_supported) {
+    if (machine->numa_state) {
         numa_complete_configuration(machine);
         if (machine->numa_state->num_nodes) {
             machine_numa_finish_cpu_init(machine);
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] numa: properly check if numa is supported
  2019-12-12 12:48 ` [PATCH 2/2] numa: properly check if numa is supported Igor Mammedov
@ 2019-12-13  1:33   ` Tao Xu
  2019-12-13  9:12     ` Igor Mammedov
  2019-12-19 17:57   ` Eduardo Habkost
  1 sibling, 1 reply; 13+ messages in thread
From: Tao Xu @ 2019-12-13  1:33 UTC (permalink / raw)
  To: Igor Mammedov, qemu-devel
  Cc: Peter Maydell, Radoslaw Biernacki, Eduardo Habkost, qemu-stable,
	Leif Lindholm, qemu-arm

On 12/12/2019 8:48 PM, Igor Mammedov wrote:
> Commit aa57020774b, by mistake used MachineClass::numa_mem_supported
> to check if NUMA is supported by machine and also as unrelated change
> set it to true for sbsa-ref board.
> 
> Luckily change didn't break machines that support NUMA, as the field
> is set to true for them.
> 
> But the field is not intended for checking if NUMA is supported and
> will be flipped to false within this release for new machine types.
> 
> Fix it:
>   - by using previously used condition
>        !mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id
>     the first time and then use MachineState::numa_state down the road
>     to check if NUMA is supported
>   - dropping stray sbsa-ref chunk
> 
> Fixes: aa57020774b690a22be72453b8e91c9b5a68c516
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> CC: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
> CC: Peter Maydell <peter.maydell@linaro.org>
> CC: Leif Lindholm <leif.lindholm@linaro.org>
> CC: qemu-arm@nongnu.org
> CC: qemu-stable@nongnu.org
> 
> 
>   hw/arm/sbsa-ref.c | 1 -
>   hw/core/machine.c | 4 ++--
>   2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> index 27046cc..c6261d4 100644
> --- a/hw/arm/sbsa-ref.c
> +++ b/hw/arm/sbsa-ref.c
> @@ -791,7 +791,6 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
>       mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids;
>       mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props;
>       mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id;
> -    mc->numa_mem_supported = true;
>   }
>   
>   static const TypeInfo sbsa_ref_info = {
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 1689ad3..aa63231 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -958,7 +958,7 @@ static void machine_initfn(Object *obj)
>                                           NULL);
>       }
>   
> -    if (mc->numa_mem_supported) {
> +    if (mc->cpu_index_to_instance_props && mc->get_default_cpu_node_id) {
>           ms->numa_state = g_new0(NumaState, 1);
>       }

I am wondering if @numa_mem_supported is unused here, it is unused for 
QEMU, because the only usage of @numa_mem_supported is to initialize 
@numa_state. Or there is other usage? So should it be removed from 
struct MachineClass?




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] numa: properly check if numa is supported
  2019-12-13  1:33   ` Tao Xu
@ 2019-12-13  9:12     ` Igor Mammedov
  2019-12-16  1:03       ` Tao Xu
  0 siblings, 1 reply; 13+ messages in thread
From: Igor Mammedov @ 2019-12-13  9:12 UTC (permalink / raw)
  To: Tao Xu
  Cc: Peter Maydell, Radoslaw Biernacki, Eduardo Habkost, qemu-devel,
	Leif Lindholm, qemu-stable, qemu-arm

On Fri, 13 Dec 2019 09:33:10 +0800
Tao Xu <tao3.xu@intel.com> wrote:

> On 12/12/2019 8:48 PM, Igor Mammedov wrote:
> > Commit aa57020774b, by mistake used MachineClass::numa_mem_supported
> > to check if NUMA is supported by machine and also as unrelated change
> > set it to true for sbsa-ref board.
> > 
> > Luckily change didn't break machines that support NUMA, as the field
> > is set to true for them.
> > 
> > But the field is not intended for checking if NUMA is supported and
> > will be flipped to false within this release for new machine types.
> > 
> > Fix it:
> >   - by using previously used condition
> >        !mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id
> >     the first time and then use MachineState::numa_state down the road
> >     to check if NUMA is supported
> >   - dropping stray sbsa-ref chunk
> > 
> > Fixes: aa57020774b690a22be72453b8e91c9b5a68c516
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> > CC: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
> > CC: Peter Maydell <peter.maydell@linaro.org>
> > CC: Leif Lindholm <leif.lindholm@linaro.org>
> > CC: qemu-arm@nongnu.org
> > CC: qemu-stable@nongnu.org
> > 
> > 
> >   hw/arm/sbsa-ref.c | 1 -
> >   hw/core/machine.c | 4 ++--
> >   2 files changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> > index 27046cc..c6261d4 100644
> > --- a/hw/arm/sbsa-ref.c
> > +++ b/hw/arm/sbsa-ref.c
> > @@ -791,7 +791,6 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
> >       mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids;
> >       mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props;
> >       mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id;
> > -    mc->numa_mem_supported = true;
> >   }
> >   
> >   static const TypeInfo sbsa_ref_info = {
> > diff --git a/hw/core/machine.c b/hw/core/machine.c
> > index 1689ad3..aa63231 100644
> > --- a/hw/core/machine.c
> > +++ b/hw/core/machine.c
> > @@ -958,7 +958,7 @@ static void machine_initfn(Object *obj)
> >                                           NULL);
> >       }
> >   
> > -    if (mc->numa_mem_supported) {
> > +    if (mc->cpu_index_to_instance_props && mc->get_default_cpu_node_id) {
> >           ms->numa_state = g_new0(NumaState, 1);
> >       }  
> 
> I am wondering if @numa_mem_supported is unused here, it is unused for 
> QEMU, because the only usage of @numa_mem_supported is to initialize 
> @numa_state. Or there is other usage? So should it be removed from 
> struct MachineClass?
You are wrong, it's not intended for numa_state initialization,
read doc comment for it in include/hw/boards.h
(for full story look at commit cd5ff8333a3)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] numa: properly check if numa is supported
  2019-12-13  9:12     ` Igor Mammedov
@ 2019-12-16  1:03       ` Tao Xu
  0 siblings, 0 replies; 13+ messages in thread
From: Tao Xu @ 2019-12-16  1:03 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: Peter Maydell, Radoslaw Biernacki, Eduardo Habkost, qemu-devel,
	Leif Lindholm, qemu-stable, qemu-arm

On 12/13/2019 5:12 PM, Igor Mammedov wrote:
> On Fri, 13 Dec 2019 09:33:10 +0800
> Tao Xu <tao3.xu@intel.com> wrote:
> 
>> On 12/12/2019 8:48 PM, Igor Mammedov wrote:
>>> Commit aa57020774b, by mistake used MachineClass::numa_mem_supported
>>> to check if NUMA is supported by machine and also as unrelated change
>>> set it to true for sbsa-ref board.
>>>
>>> Luckily change didn't break machines that support NUMA, as the field
>>> is set to true for them.
>>>
>>> But the field is not intended for checking if NUMA is supported and
>>> will be flipped to false within this release for new machine types.
>>>
>>> Fix it:
>>>    - by using previously used condition
>>>         !mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id
>>>      the first time and then use MachineState::numa_state down the road
>>>      to check if NUMA is supported
>>>    - dropping stray sbsa-ref chunk
>>>
>>> Fixes: aa57020774b690a22be72453b8e91c9b5a68c516
>>> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
>>> ---
>>> CC: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
>>> CC: Peter Maydell <peter.maydell@linaro.org>
>>> CC: Leif Lindholm <leif.lindholm@linaro.org>
>>> CC: qemu-arm@nongnu.org
>>> CC: qemu-stable@nongnu.org
>>>
>>>
>>>    hw/arm/sbsa-ref.c | 1 -
>>>    hw/core/machine.c | 4 ++--
>>>    2 files changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
>>> index 27046cc..c6261d4 100644
>>> --- a/hw/arm/sbsa-ref.c
>>> +++ b/hw/arm/sbsa-ref.c
>>> @@ -791,7 +791,6 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
>>>        mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids;
>>>        mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props;
>>>        mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id;
>>> -    mc->numa_mem_supported = true;
>>>    }
>>>    
>>>    static const TypeInfo sbsa_ref_info = {
>>> diff --git a/hw/core/machine.c b/hw/core/machine.c
>>> index 1689ad3..aa63231 100644
>>> --- a/hw/core/machine.c
>>> +++ b/hw/core/machine.c
>>> @@ -958,7 +958,7 @@ static void machine_initfn(Object *obj)
>>>                                            NULL);
>>>        }
>>>    
>>> -    if (mc->numa_mem_supported) {
>>> +    if (mc->cpu_index_to_instance_props && mc->get_default_cpu_node_id) {
>>>            ms->numa_state = g_new0(NumaState, 1);
>>>        }
>>
>> I am wondering if @numa_mem_supported is unused here, it is unused for
>> QEMU, because the only usage of @numa_mem_supported is to initialize
>> @numa_state. Or there is other usage? So should it be removed from
>> struct MachineClass?
> You are wrong, it's not intended for numa_state initialization,
> read doc comment for it in include/hw/boards.h
> (for full story look at commit cd5ff8333a3)
> 
I understand.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] numa: stop abusing numa_mem_supported
  2019-12-12 12:48 [PATCH 0/2] numa: stop abusing numa_mem_supported Igor Mammedov
  2019-12-12 12:48 ` [PATCH 1/2] numa: remove not needed check Igor Mammedov
  2019-12-12 12:48 ` [PATCH 2/2] numa: properly check if numa is supported Igor Mammedov
@ 2019-12-19 13:28 ` Igor Mammedov
  2019-12-19 13:30   ` Michael S. Tsirkin
  2 siblings, 1 reply; 13+ messages in thread
From: Igor Mammedov @ 2019-12-19 13:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, Tao Xu, Eduardo Habkost, mst

On Thu, 12 Dec 2019 13:48:54 +0100
Igor Mammedov <imammedo@redhat.com> wrote:

> A fix  and cleanup for a mistakes that slipped by me in
>   aa57020774 (numa: move numa global variable nb_numa_nodes into MachineState)

ping,

could someone pick it up please?

> 
> 
> CC: Eduardo Habkost <ehabkost@redhat.com>
> CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> CC: Tao Xu <tao3.xu@intel.com>
> 
> Igor Mammedov (2):
>   numa: remove not needed check
>   numa: properly check if numa is supported
> 
>  hw/arm/sbsa-ref.c | 1 -
>  hw/core/machine.c | 4 ++--
>  hw/core/numa.c    | 7 +------
>  3 files changed, 3 insertions(+), 9 deletions(-)
> 



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] numa: stop abusing numa_mem_supported
  2019-12-19 13:28 ` [PATCH 0/2] numa: stop abusing numa_mem_supported Igor Mammedov
@ 2019-12-19 13:30   ` Michael S. Tsirkin
  2019-12-19 13:42     ` Igor Mammedov
  0 siblings, 1 reply; 13+ messages in thread
From: Michael S. Tsirkin @ 2019-12-19 13:30 UTC (permalink / raw)
  To: Igor Mammedov; +Cc: pbonzini, Tao Xu, qemu-devel, Eduardo Habkost

On Thu, Dec 19, 2019 at 02:28:51PM +0100, Igor Mammedov wrote:
> On Thu, 12 Dec 2019 13:48:54 +0100
> Igor Mammedov <imammedo@redhat.com> wrote:
> 
> > A fix  and cleanup for a mistakes that slipped by me in
> >   aa57020774 (numa: move numa global variable nb_numa_nodes into MachineState)
> 
> ping,
> 
> could someone pick it up please?

Looks more like Eduardo's thing.

> > 
> > 
> > CC: Eduardo Habkost <ehabkost@redhat.com>
> > CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> > CC: Tao Xu <tao3.xu@intel.com>
> > 
> > Igor Mammedov (2):
> >   numa: remove not needed check
> >   numa: properly check if numa is supported
> > 
> >  hw/arm/sbsa-ref.c | 1 -
> >  hw/core/machine.c | 4 ++--
> >  hw/core/numa.c    | 7 +------
> >  3 files changed, 3 insertions(+), 9 deletions(-)
> > 



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] numa: stop abusing numa_mem_supported
  2019-12-19 13:30   ` Michael S. Tsirkin
@ 2019-12-19 13:42     ` Igor Mammedov
  2019-12-20 13:14       ` Paolo Bonzini
  0 siblings, 1 reply; 13+ messages in thread
From: Igor Mammedov @ 2019-12-19 13:42 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: pbonzini, Tao Xu, qemu-devel, Eduardo Habkost

On Thu, 19 Dec 2019 08:30:34 -0500
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Thu, Dec 19, 2019 at 02:28:51PM +0100, Igor Mammedov wrote:
> > On Thu, 12 Dec 2019 13:48:54 +0100
> > Igor Mammedov <imammedo@redhat.com> wrote:
> >   
> > > A fix  and cleanup for a mistakes that slipped by me in
> > >   aa57020774 (numa: move numa global variable nb_numa_nodes into MachineState)  
> > 
> > ping,
> > 
> > could someone pick it up please?  
> 
> Looks more like Eduardo's thing.

Yep if he is still available,
but I wasn't sure with coming winter break.

In addition, this patch will be prerequisite for disabling
deprecated '-numa node,mem'
hence broadcast ping to make sure it won't get lost.

> 
> > > 
> > > 
> > > CC: Eduardo Habkost <ehabkost@redhat.com>
> > > CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> > > CC: Tao Xu <tao3.xu@intel.com>
> > > 
> > > Igor Mammedov (2):
> > >   numa: remove not needed check
> > >   numa: properly check if numa is supported
> > > 
> > >  hw/arm/sbsa-ref.c | 1 -
> > >  hw/core/machine.c | 4 ++--
> > >  hw/core/numa.c    | 7 +------
> > >  3 files changed, 3 insertions(+), 9 deletions(-)
> > >   
> 



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] numa: remove not needed check
  2019-12-12 12:48 ` [PATCH 1/2] numa: remove not needed check Igor Mammedov
@ 2019-12-19 17:45   ` Eduardo Habkost
  0 siblings, 0 replies; 13+ messages in thread
From: Eduardo Habkost @ 2019-12-19 17:45 UTC (permalink / raw)
  To: Igor Mammedov; +Cc: Tao Xu, qemu-devel

On Thu, Dec 12, 2019 at 01:48:55PM +0100, Igor Mammedov wrote:
> Currently parse_numa_node() is always called from already numa
> enabled context.
> Drop unnecessary check if numa is supported.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>

I'm queueing and I plan to send a pull request before the holiday
break.

-- 
Eduardo



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] numa: properly check if numa is supported
  2019-12-12 12:48 ` [PATCH 2/2] numa: properly check if numa is supported Igor Mammedov
  2019-12-13  1:33   ` Tao Xu
@ 2019-12-19 17:57   ` Eduardo Habkost
  1 sibling, 0 replies; 13+ messages in thread
From: Eduardo Habkost @ 2019-12-19 17:57 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: Peter Maydell, Radoslaw Biernacki, Tao Xu, qemu-devel,
	Leif Lindholm, qemu-stable, qemu-arm

On Thu, Dec 12, 2019 at 01:48:56PM +0100, Igor Mammedov wrote:
> Commit aa57020774b, by mistake used MachineClass::numa_mem_supported
> to check if NUMA is supported by machine and also as unrelated change
> set it to true for sbsa-ref board.
> 
> Luckily change didn't break machines that support NUMA, as the field
> is set to true for them.
> 
> But the field is not intended for checking if NUMA is supported and
> will be flipped to false within this release for new machine types.
> 
> Fix it:
>  - by using previously used condition
>       !mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id
>    the first time and then use MachineState::numa_state down the road
>    to check if NUMA is supported
>  - dropping stray sbsa-ref chunk
> 
> Fixes: aa57020774b690a22be72453b8e91c9b5a68c516
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>

I'm queueing this and plan to submit a pull request soon.

-- 
Eduardo



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] numa: stop abusing numa_mem_supported
  2019-12-19 13:42     ` Igor Mammedov
@ 2019-12-20 13:14       ` Paolo Bonzini
  2019-12-20 15:11         ` Igor Mammedov
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2019-12-20 13:14 UTC (permalink / raw)
  To: Igor Mammedov, Michael S. Tsirkin; +Cc: Tao Xu, qemu-devel, Eduardo Habkost

On 19/12/19 14:42, Igor Mammedov wrote:
> On Thu, 19 Dec 2019 08:30:34 -0500
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
>> On Thu, Dec 19, 2019 at 02:28:51PM +0100, Igor Mammedov wrote:
>>> On Thu, 12 Dec 2019 13:48:54 +0100
>>> Igor Mammedov <imammedo@redhat.com> wrote:
>>>   
>>>> A fix  and cleanup for a mistakes that slipped by me in
>>>>   aa57020774 (numa: move numa global variable nb_numa_nodes into MachineState)  
>>>
>>> ping,
>>>
>>> could someone pick it up please?  
>>
>> Looks more like Eduardo's thing.
> 
> Yep if he is still available,
> but I wasn't sure with coming winter break.
> 
> In addition, this patch will be prerequisite for disabling
> deprecated '-numa node,mem'
> hence broadcast ping to make sure it won't get lost.

I'll take care of it (after new year).

Paolo



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] numa: stop abusing numa_mem_supported
  2019-12-20 13:14       ` Paolo Bonzini
@ 2019-12-20 15:11         ` Igor Mammedov
  0 siblings, 0 replies; 13+ messages in thread
From: Igor Mammedov @ 2019-12-20 15:11 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Tao Xu, qemu-devel, Eduardo Habkost, Michael S. Tsirkin

On Fri, 20 Dec 2019 14:14:58 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:

> On 19/12/19 14:42, Igor Mammedov wrote:
> > On Thu, 19 Dec 2019 08:30:34 -0500
> > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >   
> >> On Thu, Dec 19, 2019 at 02:28:51PM +0100, Igor Mammedov wrote:  
> >>> On Thu, 12 Dec 2019 13:48:54 +0100
> >>> Igor Mammedov <imammedo@redhat.com> wrote:
> >>>     
> >>>> A fix  and cleanup for a mistakes that slipped by me in
> >>>>   aa57020774 (numa: move numa global variable nb_numa_nodes into MachineState)    
> >>>
> >>> ping,
> >>>
> >>> could someone pick it up please?    
> >>
> >> Looks more like Eduardo's thing.  
> > 
> > Yep if he is still available,
> > but I wasn't sure with coming winter break.
> > 
> > In addition, this patch will be prerequisite for disabling
> > deprecated '-numa node,mem'
> > hence broadcast ping to make sure it won't get lost.  
> 
> I'll take care of it (after new year).

It' looks like Eduardo already picked it up.
(meanwhile I'm preparing to post mem-path patch bomb with these included)


Though it would be nice is you could take a look at another series
  [PATCH for-5.0 v2 0/9] q35: CPU hotplug with secure boot, part 1+2
especially 2/9 patch

> 
> Paolo
> 
> 



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-12-20 15:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12 12:48 [PATCH 0/2] numa: stop abusing numa_mem_supported Igor Mammedov
2019-12-12 12:48 ` [PATCH 1/2] numa: remove not needed check Igor Mammedov
2019-12-19 17:45   ` Eduardo Habkost
2019-12-12 12:48 ` [PATCH 2/2] numa: properly check if numa is supported Igor Mammedov
2019-12-13  1:33   ` Tao Xu
2019-12-13  9:12     ` Igor Mammedov
2019-12-16  1:03       ` Tao Xu
2019-12-19 17:57   ` Eduardo Habkost
2019-12-19 13:28 ` [PATCH 0/2] numa: stop abusing numa_mem_supported Igor Mammedov
2019-12-19 13:30   ` Michael S. Tsirkin
2019-12-19 13:42     ` Igor Mammedov
2019-12-20 13:14       ` Paolo Bonzini
2019-12-20 15:11         ` Igor Mammedov

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).