Message ID | 1554691246-7249-1-git-send-email-fionali-oc@zhaoxin.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | cpupool: fix ASSERT( c != old_pool ) | expand |
On 08/04/2019 04:40, FionaLi-oc wrote: > Assigning cpu to cpupool needn't to switch cpu scheduler when > system state is resume, otherwise it will cause ASSERT in > schedule_cpu_switch(). I don't think this patch is needed on current staging tree. Commit 6870ea9d1fad6fbe27 changed resume handling leading to cpupool_assign_cpu_locked() being no longer called when resuming. Juergen
>>> On 08.04.19 at 07:09, <jgross@suse.com> wrote: > On 08/04/2019 04:40, FionaLi-oc wrote: >> Assigning cpu to cpupool needn't to switch cpu scheduler when >> system state is resume, otherwise it will cause ASSERT in >> schedule_cpu_switch(). > > I don't think this patch is needed on current staging tree. Commit > 6870ea9d1fad6fbe27 changed resume handling leading to > cpupool_assign_cpu_locked() being no longer called when resuming. But is it something worthwhile to put onto stable trees (with the one missing blank added)? Jan
On 08/04/2019 11:26, Jan Beulich wrote: >>>> On 08.04.19 at 07:09, <jgross@suse.com> wrote: >> On 08/04/2019 04:40, FionaLi-oc wrote: >>> Assigning cpu to cpupool needn't to switch cpu scheduler when >>> system state is resume, otherwise it will cause ASSERT in >>> schedule_cpu_switch(). >> >> I don't think this patch is needed on current staging tree. Commit >> 6870ea9d1fad6fbe27 changed resume handling leading to >> cpupool_assign_cpu_locked() being no longer called when resuming. > > But is it something worthwhile to put onto stable trees (with the > one missing blank added)? I don't think it is always correct. While avoiding the ASSERT() triggering it won't switch back the scheduler from the default one at resume, which was activated when suspending the machine. So for older Xen versions we'd need to know which ASSERT() was triggering and why that did happen, or we could backport my series removing really the need for calling schedule_cpu_switch(). Juergen
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)
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@zhaoxin.com> --- xen/common/cpupool.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)