All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] cpupool: fix ASSERT( c != old_pool )
@ 2019-04-08 10:25 ` Juergen Gross
  0 siblings, 0 replies; 5+ messages in thread
From: Juergen Gross @ 2019-04-08 10:25 UTC (permalink / raw)
  To: Jan Beulich, FionaLi-oc <fionali-oc@zhaoxin.com>
  Cc: xen-devel, cobechen, Dario Faggioli

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

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

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

* Re: [Xen-devel] [PATCH] cpupool: fix ASSERT( c != old_pool )
@ 2019-04-08 10:25 ` Juergen Gross
  0 siblings, 0 replies; 5+ messages in thread
From: Juergen Gross @ 2019-04-08 10:25 UTC (permalink / raw)
  To: Jan Beulich, FionaLi-oc <fionali-oc@zhaoxin.com>
  Cc: xen-devel, cobechen, Dario Faggioli

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

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

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

* Re: [PATCH] cpupool: fix ASSERT( c != old_pool )
  2019-04-08  5:09 ` Juergen Gross
@ 2019-04-08  9:26   ` Jan Beulich
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2019-04-08  9:26 UTC (permalink / raw)
  To: Juergen Gross, FionaLi-oc; +Cc: xen-devel, cobechen, Dario Faggioli

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



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

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

* Re: [PATCH] cpupool: fix ASSERT( c != old_pool )
  2019-04-08  2:40 FionaLi-oc
@ 2019-04-08  5:09 ` Juergen Gross
  2019-04-08  9:26   ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2019-04-08  5:09 UTC (permalink / raw)
  To: FionaLi-oc, xen-devel; +Cc: cobechen, dfaggioli

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

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

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

* [PATCH] cpupool: fix ASSERT( c != old_pool )
@ 2019-04-08  2:40 FionaLi-oc
  2019-04-08  5:09 ` Juergen Gross
  0 siblings, 1 reply; 5+ messages in thread
From: FionaLi-oc @ 2019-04-08  2:40 UTC (permalink / raw)
  To: xen-devel; +Cc: jgross, cobechen, FionaLi-oc, dfaggioli

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

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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-04-08 10:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 10:25 [PATCH] cpupool: fix ASSERT( c != old_pool ) Juergen Gross
2019-04-08 10:25 ` [Xen-devel] " Juergen Gross
  -- strict thread matches above, loose matches on Subject: below --
2019-04-08  2:40 FionaLi-oc
2019-04-08  5:09 ` Juergen Gross
2019-04-08  9:26   ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.