From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel <xen-devel@lists.xenproject.org>
Cc: george.dunlap@eu.citrix.com,
Andrew Cooper <andrew.cooper3@citrix.com>,
keir@xen.org, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 2/2] sched: credit2: use boot CPU info for CPU #0
Date: Fri, 22 Aug 2014 19:15:42 +0200 [thread overview]
Message-ID: <20140822171542.32764.42338.stgit@Solace.lan> (raw)
In-Reply-To: <20140822165628.32764.15082.stgit@Solace.lan>
when deciding, during pCPU initialization, inside the scheduler
what runqueue should be associated to it.
This, thanks to the fact that topology identification of the
boot CPU now happens earlier than the scheduler initialization,
fixes the bug that CPU 0 was always being associated with runqueue
0, no matter what the actual topology is.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
---
xen/common/sched_credit2.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index 1ca521b..1bcd6c0 100644
--- a/xen/common/sched_credit2.c
+++ b/xen/common/sched_credit2.c
@@ -54,7 +54,6 @@
* + Immediate bug-fixes
* - Do per-runqueue, grab proper lock for dump debugkey
* + Multiple sockets
- * - Detect cpu layout and make runqueue map, one per L2 (make_runq_map())
* - Simple load balancer / runqueue assignment
* - Runqueue load measurement
* - Load-based load balancer
@@ -85,8 +84,8 @@
* to a small value, and a fixed credit is added to everyone.
*
* The plan is for all cores that share an L2 will share the same
- * runqueue. At the moment, there is one global runqueue for all
- * cores.
+ * runqueue. At the moment, there is one runqueue for each physical
+ * socket.
*/
/*
@@ -1935,13 +1934,12 @@ static void init_pcpu(const struct scheduler *ops, int cpu)
return;
}
- /* Figure out which runqueue to put it in */
+ /* Figure out which runqueue to put cpu in */
rqi = 0;
- /* Figure out which runqueue to put it in */
- /* NB: cpu 0 doesn't get a STARTING callback, so we hard-code it to runqueue 0. */
+ /* cpu 0 doesn't get a STARTING callback, so use boot CPU data for it */
if ( cpu == 0 )
- rqi = 0;
+ rqi = boot_cpu_to_socket();
else
rqi = cpu_to_socket(cpu);
next prev parent reply other threads:[~2014-08-22 17:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 17:15 [PATCH 0/2] Credit2: fix per-socket runqueue setup Dario Faggioli
2014-08-22 17:15 ` [PATCH 1/2] x86: during boot, anticipate identifying the boot cpu Dario Faggioli
2014-08-22 17:28 ` Andrew Cooper
2014-08-22 18:40 ` Dario Faggioli
2014-08-25 8:35 ` Jan Beulich
2014-08-25 8:39 ` Jan Beulich
2014-09-01 15:12 ` George Dunlap
2014-09-01 15:24 ` Jan Beulich
2014-08-22 17:15 ` Dario Faggioli [this message]
2014-08-25 8:41 ` [PATCH 2/2] sched: credit2: use boot CPU info for CPU #0 Jan Beulich
2014-08-25 8:31 ` [PATCH 0/2] Credit2: fix per-socket runqueue setup Jan Beulich
2014-09-01 13:59 ` George Dunlap
2014-09-02 16:46 ` Dario Faggioli
2014-09-03 10:00 ` George Dunlap
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=20140822171542.32764.42338.stgit@Solace.lan \
--to=dario.faggioli@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=keir@xen.org \
--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.