[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] cpupool: fix ASSERT( c != old_pool )



Assigning cpu to cpupool needn't to switch cpu scheduler when
system state is resume, otherwise it will cause ASSERT in
schedule_cpu_switch().

Signed-off-by: FionaLi-oc <fionali-oc@xxxxxxxxxxx>
---
 xen/common/cpupool.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index e89bb67..acc4a52 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -268,9 +268,13 @@ static int cpupool_assign_cpu_locked(struct cpupool *c, 
unsigned int cpu)
 
     if ( (cpupool_moving_cpu == cpu) && (c != cpupool_cpu_moving) )
         return -EADDRNOTAVAIL;
-    ret = schedule_cpu_switch(cpu, c);
-    if ( ret )
-        return ret;
+
+    if( system_state != SYS_STATE_resume )
+    {
+        ret = schedule_cpu_switch(cpu, c);
+        if ( ret )
+            return ret;
+    }
 
     cpumask_clear_cpu(cpu, &cpupool_free_cpus);
     if (cpupool_moving_cpu == cpu)
-- 
1.8.3.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.