All of lore.kernel.org
 help / color / mirror / Atom feed
From: FionaLi-oc <fionali-oc@zhaoxin.com>
To: xen-devel@lists.xenproject.org
Cc: jgross@suse.com, cobechen@zhaoxin.com,
	FionaLi-oc <fionali-oc@zhaoxin.com>,
	dfaggioli@suse.com
Subject: [PATCH] cpupool: fix ASSERT( c != old_pool )
Date: Mon, 8 Apr 2019 10:40:46 +0800	[thread overview]
Message-ID: <1554691246-7249-1-git-send-email-fionali-oc@zhaoxin.com> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: FionaLi-oc <fionali-oc@zhaoxin.com>
To: <xen-devel@lists.xenproject.org>
Cc: jgross@suse.com, cobechen@zhaoxin.com,
	FionaLi-oc <fionali-oc@zhaoxin.com>,
	dfaggioli@suse.com
Subject: [Xen-devel] [PATCH] cpupool: fix ASSERT( c != old_pool )
Date: Mon, 8 Apr 2019 10:40:46 +0800	[thread overview]
Message-ID: <1554691246-7249-1-git-send-email-fionali-oc@zhaoxin.com> (raw)
Message-ID: <20190408024046.NqD-YINyioMk0Jq2jIXWMJM82Vht82iHTZ28TgJhm8w@z> (raw)

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

             reply	other threads:[~2019-04-08  2:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08  2:40 FionaLi-oc [this message]
2019-04-08  2:40 ` [Xen-devel] [PATCH] cpupool: fix ASSERT( c != old_pool ) FionaLi-oc
2019-04-08  5:09 ` Juergen Gross
2019-04-08  5:09   ` [Xen-devel] " Juergen Gross
2019-04-08  9:26   ` Jan Beulich
2019-04-08  9:26     ` [Xen-devel] " Jan Beulich
2019-04-08 10:25 Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1554691246-7249-1-git-send-email-fionali-oc@zhaoxin.com \
    --to=fionali-oc@zhaoxin.com \
    --cc=cobechen@zhaoxin.com \
    --cc=dfaggioli@suse.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.