spapr: Ensure CPU cores are added contiguously and removed in LIFO order
PATCH 1/1 spapr: Ensure CPU cores are added contiguously and removed in LIFO order
If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the cpu_index range), migration can fail as migration with holes in cpu_index range isn't yet handled correctly.
Prevent this situation by enforcing the addition in contiguous order and removal in LIFO order so that we never end up with holes in cpu_index range.
---
While there is work in progress to support migration when there are holes in cpu_index range resulting from out-of-order plug or unplug, this patch is intended as a last resort if no easy, risk-free and elegant solution emerges before 2.7 dev cycle ends.
hw/ppc/spapr_cpu_core.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
hw/ppc/spapr_cpu_core.c +20 -1
@@ -126,12 +126,23 @@ static void spapr_core_release(DeviceState *dev, void *opaque)void spapr_core_unplug (HotplugHandler *hotplug_dev,DeviceState *dev,Error **errp) { +sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));CPUCore *cc =CPU_CORE (dev);sPAPRDRConnector *drc =spapr_dr_connector_by_id (SPAPR_DR_CONNECTOR_TYPE_CPU , cc->core_id);sPAPRDRConnectorClass *drck;Error *local_err =NULL ; +int smt =kvmppc_smt_threads (); +int index = cc->core_id / smt; +int spapr_max_cores = max_cpus / smp_threads; +int i; +for (i = spapr_max_cores -1 ; i > index; i--) { +if (spapr->cores[i]) { +error_setg (errp,"core-id %d should be removed first" , i * smt); +return ; + } + }g_assert (drc); drck =SPAPR_DR_CONNECTOR_GET_CLASS (drc);
@@ -214,7 +225,7 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,sPAPRMachineClass *smc =SPAPR_MACHINE_GET_CLASS (OBJECT (hotplug_dev));sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));int spapr_max_cores = max_cpus / smp_threads; -int index; +int index, i;int smt =kvmppc_smt_threads ();Error *local_err =NULL ;CPUCore *cc =CPU_CORE (dev);
@@ -252,6 +263,14 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, goto out; } +for (i =0 ; i < index; i++) { +if (!spapr->cores[i]) { +error_setg (&local_err,"core-id %d should be added first" , + i * smt); + goto out; + } + } + out:g_free (base_core_type);error_propagate (errp, local_err);
Signature · 1 line
2.7.4
Quoted 8 lines · On Wed, 13 Jul 2016 12:20:20 +0530 Bharata B Rao <[email protected]>…
If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the
cpu_indexrange), migration can fail as migration with holes incpu_indexrange isn't yet handled correctly.Prevent this situation by enforcing the addition in contiguous order and removal in LIFO order so that we never end up with holes in
cpu_indexrange.
Adding this limitation looks better than adding migration_id as it will allow libvirt to use the current -numa cpus=... while doing the same amount of guess work as it does now.
Similar patch for x86 won't be so simple as cpu-add can add cpus with gaps (breaking migration at that), so I'd need to keep it that way with some compat code, but that shouldn't be issue.
Quoted 62 lines
Signed-off-by Bharata B Rao <[email protected]>---
While there is work in progress to support migration when there are holes incpu_indexrange resulting from out-of-order plug or unplug, this patch is intended as a last resort if no easy, risk-free and elegant solution emerges before 2.7 dev cycle ends.hw/ppc/spapr_cpu_core.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)hw/ppc/spapr_cpu_core.c +20
-1@@ -126,12 +126,23 @@ static void spapr_core_release(DeviceState *dev, void *opaque)void spapr_core_unplug (HotplugHandler *hotplug_dev,DeviceState *dev,Error **errp) { +sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));CPUCore *cc =CPU_CORE (dev);sPAPRDRConnector *drc =spapr_dr_connector_by_id (SPAPR_DR_CONNECTOR_TYPE_CPU , cc->core_id);sPAPRDRConnectorClass *drck;Error *local_err =NULL ; +int smt =kvmppc_smt_threads (); +int index = cc->core_id / smt; +int spapr_max_cores = max_cpus / smp_threads; +int i; +for (i = spapr_max_cores -1 ; i > index; i--) { +if (spapr->cores[i]) { +error_setg (errp,"core-id %d should be removed first" , i * smt); +return ; + } + }g_assert (drc); drck =SPAPR_DR_CONNECTOR_GET_CLASS (drc);@@ -214,7 +225,7 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,sPAPRMachineClass *smc =SPAPR_MACHINE_GET_CLASS (OBJECT (hotplug_dev));sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));int spapr_max_cores = max_cpus / smp_threads; -int index; +int index, i;int smt =kvmppc_smt_threads ();Error *local_err =NULL ;CPUCore *cc =CPU_CORE (dev);@@ -252,6 +263,14 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, goto out; } +for (i =0 ; i < index; i++) { +if (!spapr->cores[i]) { +error_setg (&local_err,"core-id %d should be added first" , + i * smt); + goto out; + } + } + out:g_free (base_core_type);error_propagate (errp, local_err);
Quoted 11 lines · On Wed, 13 Jul 2016 09:42:54 +0200 Igor Mammedov <[email protected]> wrote:
Quoted 8 lines · On Wed, 13 Jul 2016 12:20:20 +0530 Bharata B Rao <[email protected]>…
If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the
cpu_indexrange), migration can fail as migration with holes incpu_indexrange isn't yet handled correctly.Prevent this situation by enforcing the addition in contiguous order and removal in LIFO order so that we never end up with holes in
cpu_indexrange.
Quoted 7 lines
Adding this limitation looks better than adding
migration_idas it will allow libvirt to use the current -numa cpus=... while doing the same amount of guess work as it does now.Similar patch for x86 won't be so simple as cpu-add can add cpus with gaps (breaking migration at that), so I'd need to keep it that way with some compat code, but that shouldn't be issue.
CCing Peter for libvirt's opinion on this turn of events
Quoted 66 lines
Quoted 64 lines
Signed-off-by Bharata B Rao <[email protected]>---
While there is work in progress to support migration when there are holes incpu_indexrange resulting from out-of-order plug or unplug, this patch is intended as a last resort if no easy, risk-free and elegant solution emerges before 2.7 dev cycle ends.hw/ppc/spapr_cpu_core.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)hw/ppc/spapr_cpu_core.c +20
-1@@ -126,12 +126,23 @@ static void spapr_core_release(DeviceState *dev, void *opaque)void spapr_core_unplug (HotplugHandler *hotplug_dev,DeviceState *dev,Error **errp) { +sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));CPUCore *cc =CPU_CORE (dev);sPAPRDRConnector *drc =spapr_dr_connector_by_id (SPAPR_DR_CONNECTOR_TYPE_CPU , cc->core_id);sPAPRDRConnectorClass *drck;Error *local_err =NULL ; +int smt =kvmppc_smt_threads (); +int index = cc->core_id / smt; +int spapr_max_cores = max_cpus / smp_threads; +int i; +for (i = spapr_max_cores -1 ; i > index; i--) { +if (spapr->cores[i]) { +error_setg (errp,"core-id %d should be removed first" , i * smt); +return ; + } + }g_assert (drc); drck =SPAPR_DR_CONNECTOR_GET_CLASS (drc);@@ -214,7 +225,7 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,sPAPRMachineClass *smc =SPAPR_MACHINE_GET_CLASS (OBJECT (hotplug_dev));sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));int spapr_max_cores = max_cpus / smp_threads; -int index; +int index, i;int smt =kvmppc_smt_threads ();Error *local_err =NULL ;CPUCore *cc =CPU_CORE (dev);@@ -252,6 +263,14 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, goto out; } +for (i =0 ; i < index; i++) { +if (!spapr->cores[i]) { +error_setg (&local_err,"core-id %d should be added first" , + i * smt); + goto out; + } + } + out:g_free (base_core_type);error_propagate (errp, local_err);
Quoted 14 lines · On Wed, 13 Jul 2016 10:19:00 +0200 Igor Mammedov <[email protected]> wrote:
Quoted 11 lines · On Wed, 13 Jul 2016 09:42:54 +0200 Igor Mammedov <[email protected]> wrote:
Quoted 8 lines · On Wed, 13 Jul 2016 12:20:20 +0530 Bharata B Rao <[email protected]>…
If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the
cpu_indexrange), migration can fail as migration with holes incpu_indexrange isn't yet handled correctly.Prevent this situation by enforcing the addition in contiguous order and removal in LIFO order so that we never end up with holes in
cpu_indexrange.
Quoted 8 lines
Quoted 7 lines
Adding this limitation looks better than adding
migration_idas it will allow libvirt to use the current -numa cpus=... while doing the same amount of guess work as it does now.Similar patch for x86 won't be so simple as cpu-add can add cpus with gaps (breaking migration at that), so I'd need to keep it that way with some compat code, but that shouldn't be issue.
CCing Peter for libvirt's opinion on this turn of events
didn't actually CCed him :/
Quoted 69 lines
Quoted 67 lines
Quoted 65 lines
Signed-off-by Bharata B Rao <[email protected]>---
While there is work in progress to support migration when there are holes incpu_indexrange resulting from out-of-order plug or unplug, this patch is intended as a last resort if no easy, risk-free and elegant solution emerges before 2.7 dev cycle ends.hw/ppc/spapr_cpu_core.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)hw/ppc/spapr_cpu_core.c +20
-1@@ -126,12 +126,23 @@ static void spapr_core_release(DeviceState *dev, void *opaque)void spapr_core_unplug (HotplugHandler *hotplug_dev,DeviceState *dev,Error **errp) { +sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));CPUCore *cc =CPU_CORE (dev);sPAPRDRConnector *drc =spapr_dr_connector_by_id (SPAPR_DR_CONNECTOR_TYPE_CPU , cc->core_id);sPAPRDRConnectorClass *drck;Error *local_err =NULL ; +int smt =kvmppc_smt_threads (); +int index = cc->core_id / smt; +int spapr_max_cores = max_cpus / smp_threads; +int i; +for (i = spapr_max_cores -1 ; i > index; i--) { +if (spapr->cores[i]) { +error_setg (errp,"core-id %d should be removed first" , i * smt); +return ; + } + }g_assert (drc); drck =SPAPR_DR_CONNECTOR_GET_CLASS (drc);@@ -214,7 +225,7 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,sPAPRMachineClass *smc =SPAPR_MACHINE_GET_CLASS (OBJECT (hotplug_dev));sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));int spapr_max_cores = max_cpus / smp_threads; -int index; +int index, i;int smt =kvmppc_smt_threads ();Error *local_err =NULL ;CPUCore *cc =CPU_CORE (dev);@@ -252,6 +263,14 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, goto out; } +for (i =0 ; i < index; i++) { +if (!spapr->cores[i]) { +error_setg (&local_err,"core-id %d should be added first" , + i * smt); + goto out; + } + } + out:g_free (base_core_type);error_propagate (errp, local_err);
Quoted 11 lines · On Wed, 13 Jul 2016 09:42:54 +0200 Igor Mammedov <[email protected]> wrote:
Quoted 8 lines · On Wed, 13 Jul 2016 12:20:20 +0530 Bharata B Rao <[email protected]>…
If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the
cpu_indexrange), migration can fail as migration with holes incpu_indexrange isn't yet handled correctly.Prevent this situation by enforcing the addition in contiguous order and removal in LIFO order so that we never end up with holes in
cpu_indexrange.
Quoted 8 lines
Adding this limitation looks better than adding
migration_idas it will allow libvirt to use the current -numa cpus=... while doing the same amount of guess work as it does now.Similar patch for x86 won't be so simple as cpu-add can add cpus with gaps (breaking migration at that), so I'd need to keep it that way with some compat code, but that shouldn't be issue.
And does libvirt take care not to add cpus with gaps ? If so, maybe it can do the same with PPC, and we'd simply warn the user that migration is broken if we introduce gaps. Makes sense ?
Quoted 65 lines
Quoted 63 lines
Signed-off-by Bharata B Rao <[email protected]>---
While there is work in progress to support migration when there are holes incpu_indexrange resulting from out-of-order plug or unplug, this patch is intended as a last resort if no easy, risk-free and elegant solution emerges before 2.7 dev cycle ends.hw/ppc/spapr_cpu_core.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)hw/ppc/spapr_cpu_core.c +20
-1@@ -126,12 +126,23 @@ static void spapr_core_release(DeviceState *dev, void *opaque)void spapr_core_unplug (HotplugHandler *hotplug_dev,DeviceState *dev,Error **errp) { +sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));CPUCore *cc =CPU_CORE (dev);sPAPRDRConnector *drc =spapr_dr_connector_by_id (SPAPR_DR_CONNECTOR_TYPE_CPU , cc->core_id);sPAPRDRConnectorClass *drck;Error *local_err =NULL ; +int smt =kvmppc_smt_threads (); +int index = cc->core_id / smt; +int spapr_max_cores = max_cpus / smp_threads; +int i; +for (i = spapr_max_cores -1 ; i > index; i--) { +if (spapr->cores[i]) { +error_setg (errp,"core-id %d should be removed first" , i * smt); +return ; + } + }g_assert (drc); drck =SPAPR_DR_CONNECTOR_GET_CLASS (drc);@@ -214,7 +225,7 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,sPAPRMachineClass *smc =SPAPR_MACHINE_GET_CLASS (OBJECT (hotplug_dev));sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));int spapr_max_cores = max_cpus / smp_threads; -int index; +int index, i;int smt =kvmppc_smt_threads ();Error *local_err =NULL ;CPUCore *cc =CPU_CORE (dev);@@ -252,6 +263,14 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, goto out; } +for (i =0 ; i < index; i++) { +if (!spapr->cores[i]) { +error_setg (&local_err,"core-id %d should be added first" , + i * smt); + goto out; + } + } + out:g_free (base_core_type);error_propagate (errp, local_err);
David Gibson
AppliedQuoted 9 lines · Bharata B Rao
If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the
cpu_indexrange), migration can fail as migration with holes incpu_indexrange isn't yet handled correctly.Prevent this situation by enforcing the addition in contiguous order and removal in LIFO order so that we never end up with holes in
cpu_indexrange.
Quoted 6 lines
Signed-off-by Bharata B Rao <[email protected]>---
While there is work in progress to support migration when there are holes incpu_indexrange resulting from out-of-order plug or unplug, this patch is intended as a last resort if no easy, risk-free and elegant solution emerges before 2.7 dev cycle ends.
Applied to ppc-for-2.7. We can revert it once the problems with cpu_index are sorted out.
Quoted 56 lines
hw/ppc/spapr_cpu_core.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)hw/ppc/spapr_cpu_core.c +20
-1@@ -126,12 +126,23 @@ static void spapr_core_release(DeviceState *dev, void *opaque)void spapr_core_unplug (HotplugHandler *hotplug_dev,DeviceState *dev,Error **errp) { +sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));CPUCore *cc =CPU_CORE (dev);sPAPRDRConnector *drc =spapr_dr_connector_by_id (SPAPR_DR_CONNECTOR_TYPE_CPU , cc->core_id);sPAPRDRConnectorClass *drck;Error *local_err =NULL ; +int smt =kvmppc_smt_threads (); +int index = cc->core_id / smt; +int spapr_max_cores = max_cpus / smp_threads; +int i; +for (i = spapr_max_cores -1 ; i > index; i--) { +if (spapr->cores[i]) { +error_setg (errp,"core-id %d should be removed first" , i * smt); +return ; + } + }g_assert (drc); drck =SPAPR_DR_CONNECTOR_GET_CLASS (drc);@@ -214,7 +225,7 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,sPAPRMachineClass *smc =SPAPR_MACHINE_GET_CLASS (OBJECT (hotplug_dev));sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));int spapr_max_cores = max_cpus / smp_threads; -int index; +int index, i;int smt =kvmppc_smt_threads ();Error *local_err =NULL ;CPUCore *cc =CPU_CORE (dev);@@ -252,6 +263,14 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, goto out; } +for (i =0 ; i < index; i++) { +if (!spapr->cores[i]) { +error_setg (&local_err,"core-id %d should be added first" , + i * smt); + goto out; + } + } + out:g_free (base_core_type);error_propagate (errp, local_err);
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 17 lines · On Thu, 14 Jul 2016 10:51:27 +1000 David Gibson <[email protected]>…
Quoted 9 lines · Bharata B Rao
If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the
cpu_indexrange), migration can fail as migration with holes incpu_indexrange isn't yet handled correctly.Prevent this situation by enforcing the addition in contiguous order and removal in LIFO order so that we never end up with holes in
cpu_indexrange.Quoted 6 lines
Signed-off-by Bharata B Rao <[email protected]>---
While there is work in progress to support migration when there are holes incpu_indexrange resulting from out-of-order plug or unplug, this patch is intended as a last resort if no easy, risk-free and elegant solution emerges before 2.7 dev cycle ends.
Quoted 2 lines
Applied to ppc-for-2.7. We can revert it once the problems with
cpu_indexare sorted out.
You'd need to add machine type specific compat option here, so that new-qemu -M 2.7 wouldn't allow out of order too and could be migrated to old-qemu -M 2.7
Quoted 58 lines
Quoted 57 lines
hw/ppc/spapr_cpu_core.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)hw/ppc/spapr_cpu_core.c +20
-1@@ -126,12 +126,23 @@ static void spapr_core_release(DeviceState *dev, void *opaque)void spapr_core_unplug (HotplugHandler *hotplug_dev,DeviceState *dev,Error **errp) { +sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));CPUCore *cc =CPU_CORE (dev);sPAPRDRConnector *drc =spapr_dr_connector_by_id (SPAPR_DR_CONNECTOR_TYPE_CPU , cc->core_id);sPAPRDRConnectorClass *drck;Error *local_err =NULL ; +int smt =kvmppc_smt_threads (); +int index = cc->core_id / smt; +int spapr_max_cores = max_cpus / smp_threads; +int i; +for (i = spapr_max_cores -1 ; i > index; i--) { +if (spapr->cores[i]) { +error_setg (errp,"core-id %d should be removed first" , i * smt); +return ; + } + }g_assert (drc); drck =SPAPR_DR_CONNECTOR_GET_CLASS (drc);@@ -214,7 +225,7 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,sPAPRMachineClass *smc =SPAPR_MACHINE_GET_CLASS (OBJECT (hotplug_dev));sPAPRMachineState *spapr =SPAPR_MACHINE (OBJECT (hotplug_dev));int spapr_max_cores = max_cpus / smp_threads; -int index; +int index, i;int smt =kvmppc_smt_threads ();Error *local_err =NULL ;CPUCore *cc =CPU_CORE (dev);@@ -252,6 +263,14 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, goto out; } +for (i =0 ; i < index; i++) { +if (!spapr->cores[i]) { +error_setg (&local_err,"core-id %d should be added first" , + i * smt); + goto out; + } + } + out:g_free (base_core_type);error_propagate (errp, local_err);
Quoted 20 lines · Igor Mammedov
Quoted 17 lines · On Thu, 14 Jul 2016 10:51:27 +1000 David Gibson <[email protected]>…
Quoted 15 lines · Bharata B Rao
If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the
cpu_indexrange), migration can fail as migration with holes incpu_indexrange isn't yet handled correctly.Prevent this situation by enforcing the addition in contiguous order and removal in LIFO order so that we never end up with holes in
cpu_indexrange.Signed-off-by Bharata B Rao <[email protected]>---
While there is work in progress to support migration when there are holes incpu_indexrange resulting from out-of-order plug or unplug, this patch is intended as a last resort if no easy, risk-free and elegant solution emerges before 2.7 dev cycle ends.
Quoted 5 lines
Quoted 2 lines
Applied to ppc-for-2.7. We can revert it once the problems with
cpu_indexare sorted out.You'd need to add machine type specific compat option here, so that new-qemu -M 2.7 wouldn't allow out of order too and could be migrated to old-qemu -M 2.7
Hmm, do we care about migration from newer back to older versions of qemu upstream? If so, then I guess we do need this option. Though strictly we don't need it until we actually do allow any-order hotplug.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 23 lines · David Gibson
Quoted 22 lines · Igor Mammedov
Quoted 19 lines · On Thu, 14 Jul 2016 10:51:27 +1000 David Gibson <[email protected]>…
Quoted 9 lines · Bharata B Rao
If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the
cpu_indexrange), migration can fail as migration with holes incpu_indexrange isn't yet handled correctly.Prevent this situation by enforcing the addition in contiguous order and removal in LIFO order so that we never end up with holes in
cpu_indexrange.Quoted 6 lines
Signed-off-by Bharata B Rao <[email protected]>---
While there is work in progress to support migration when there are holes incpu_indexrange resulting from out-of-order plug or unplug, this patch is intended as a last resort if no easy, risk-free and elegant solution emerges before 2.7 dev cycle ends.Applied to ppc-for-2.7. We can revert it once the problems with
cpu_indexare sorted out.
Quoted 8 lines
Quoted 3 lines
You'd need to add machine type specific compat option here, so that new-qemu -M 2.7 wouldn't allow out of order too and could be migrated to old-qemu -M 2.7
Hmm, do we care about migration from newer back to older versions of qemu upstream? If so, then I guess we do need this option. Though strictly we don't need it until we actually do allow any-order hotplug.
Right. I too thought that when we relax this restriction say in 2.8, we could have a sPAPRMachineClass option to allow out-of-order hotplug for 2.8 upwards and disable it for 2.7 downwards. With this, 2.7 guest started with new-qemu can be migrated to old-qemu.
Regards,
Bharata.
Quoted 21 lines · On Fri, 15 Jul 2016 15:29:01 +1000 David Gibson <[email protected]>…
Quoted 20 lines · Igor Mammedov
Quoted 17 lines · On Thu, 14 Jul 2016 10:51:27 +1000 David Gibson <[email protected]>…
Quoted 15 lines · Bharata B Rao
If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the
cpu_indexrange), migration can fail as migration with holes incpu_indexrange isn't yet handled correctly.Prevent this situation by enforcing the addition in contiguous order and removal in LIFO order so that we never end up with holes in
cpu_indexrange.Signed-off-by Bharata B Rao <[email protected]>---
While there is work in progress to support migration when there are holes incpu_indexrange resulting from out-of-order plug or unplug, this patch is intended as a last resort if no easy, risk-free and elegant solution emerges before 2.7 dev cycle ends.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Applied to ppc-for-2.7. We can revert it once the problems with
cpu_indexare sorted out.You'd need to add machine type specific compat option here, so that new-qemu -M 2.7 wouldn't allow out of order too and could be migrated to old-qemu -M 2.7
Hmm, do we care about migration from newer back to older versions of qemu upstream?
upstream we don't, though it would reduce maintenance head-ache. (if isn't hard then why not do it upstream either)