]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
credit2: make runqueues be per-socket by default
authorDario Faggioli <dario.faggioli@citrix.com>
Tue, 29 Nov 2016 15:01:03 +0000 (16:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Nov 2016 15:01:03 +0000 (16:01 +0100)
Benchmarks have shown that per-socket runqueues arrangement
behaves better (e.g., we achieve better load balancing)
than the current per-core default.

Here's an example (coming from
https://lists.xen.org/archives/html/xen-devel/2016-06/msg02287.html ):

|=======================================|
| XEN BUILD TIME, LOW LOAD, NO NOISE    |
|---------------------------------------|
|       runq=core   runq=socket         |
|         35.200       33.433           |
|---------------------------------------|------------------------------|
| XEN BUILD TIME, HIGH LOAD, NO NOISE   | IPERF, HIGH LOAD, NO NOISE   |
|---------------------------------------|------------------------------|
|       runq=core   runq=socket         |     runq=core runq=socket    |
|         18.013       18.530           |       23.200     23.466      |
|---------------------------------------|------------------------------|
| XEN BUILD TIME, LOW LOAD, WITH NOISE  |
|-------------------------------------  |
|       runq=core   runq=socket         |
|         45.866       39.493           |
|---------------------------------------|------------------------------|
| XEN BUILD TIME, HIGH LOAD, WITH NOISE | IPERF, HIGH LOAD, WITH NOISE |
|---------------------------------------|------------------------------|
|       runq=core   runq=socket         |     runq=core runq=socket    |
|         36.840       29.080           |       19.967     21.000      |
|=======================================|==============================|

The only reason why we went for per-core, initially, was to
introduce some form of hyperthreading support. Now we have
hyperthreading support, independently from how runqueues
are organized (9bb9c7388 "xen: credit2: implement true SMT
support"), and thus we can switch to per-socket.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
docs/misc/xen-command-line.markdown
xen/common/sched_credit2.c

index 87c30238f945e7708d5906c47cf0f3f9a859d818..01389781e890373fab5474f6570a53cf46bbe34b 100644 (file)
@@ -527,7 +527,7 @@ The default value of `1 sec` is rather long.
 ### credit2\_runqueue
 > `= core | socket | node | all`
 
-> Default: `core`
+> Default: `socket`
 
 Specify how host CPUs are arranged in runqueues. Runqueues are kept
 balanced with respect to the load generated by the vCPUs running on
index c2c563d5790349d1680abeb1f93d6c2878257ee6..ef8e0d8c725abd47c7c6e5f7b7e7069937f0c5c5 100644 (file)
@@ -330,7 +330,7 @@ static const char *const opt_runqueue_str[] = {
     [OPT_RUNQUEUE_NODE] = "node",
     [OPT_RUNQUEUE_ALL] = "all"
 };
-static int __read_mostly opt_runqueue = OPT_RUNQUEUE_CORE;
+static int __read_mostly opt_runqueue = OPT_RUNQUEUE_SOCKET;
 
 static void parse_credit2_runqueue(const char *s)
 {