* [PATCH] xen: credit2: enable per cpu runqueue creation
@ 2017-04-11 16:15 Praveen Kumar
2017-04-11 16:24 ` George Dunlap
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Praveen Kumar @ 2017-04-11 16:15 UTC (permalink / raw)
To: george.dunlap, dario.faggioli; +Cc: Praveen Kumar, xen-devel
The patch introduces a new command line option 'cpu' that when used will create
runqueue per logical pCPU. This may be useful for small systems, and also for
development, performance evalution and comparison.
Signed-off-by: Praveen Kumar <kpraveen.lkml@gmail.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
---
docs/misc/xen-command-line.markdown | 3 ++-
xen/common/sched_credit2.c | 15 +++++++++++----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
index 5815d87dab..6e73766574 100644
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -525,7 +525,7 @@ also slow in responding to load changes.
The default value of `1 sec` is rather long.
### credit2\_runqueue
-> `= core | socket | node | all`
+> `= cpu | core | socket | node | all`
> Default: `socket`
@@ -536,6 +536,7 @@ balancing (for instance, it will deal better with hyperthreading),
but also more overhead.
Available alternatives, with their meaning, are:
+* `cpu`: one runqueue per each logical pCPUs of the host;
* `core`: one runqueue per each physical core of the host;
* `socket`: one runqueue per each physical socket (which often,
but not always, matches a NUMA node) of the host;
diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index bb1c657e76..ee7b443f9e 100644
--- a/xen/common/sched_credit2.c
+++ b/xen/common/sched_credit2.c
@@ -301,6 +301,9 @@ integer_param("credit2_balance_over", opt_overload_balance_tolerance);
* want that to happen basing on topology. At the moment, it is possible
* to choose to arrange runqueues to be:
*
+ * - per-cpu: meaning that there will be one runqueue per logical cpu. This
+ * will happen when if the opt_runqueue parameter is set to 'cpu'.
+ *
* - per-core: meaning that there will be one runqueue per each physical
* core of the host. This will happen if the opt_runqueue
* parameter is set to 'core';
@@ -322,11 +325,13 @@ integer_param("credit2_balance_over", opt_overload_balance_tolerance);
* either the same physical core, the same physical socket, the same NUMA
* node, or just all of them, will be put together to form runqueues.
*/
-#define OPT_RUNQUEUE_CORE 0
-#define OPT_RUNQUEUE_SOCKET 1
-#define OPT_RUNQUEUE_NODE 2
-#define OPT_RUNQUEUE_ALL 3
+#define OPT_RUNQUEUE_CPU 0
+#define OPT_RUNQUEUE_CORE 1
+#define OPT_RUNQUEUE_SOCKET 2
+#define OPT_RUNQUEUE_NODE 3
+#define OPT_RUNQUEUE_ALL 4
static const char *const opt_runqueue_str[] = {
+ [OPT_RUNQUEUE_CPU] = "cpu",
[OPT_RUNQUEUE_CORE] = "core",
[OPT_RUNQUEUE_SOCKET] = "socket",
[OPT_RUNQUEUE_NODE] = "node",
@@ -682,6 +687,8 @@ cpu_to_runqueue(struct csched2_private *prv, unsigned int cpu)
BUG_ON(cpu_to_socket(cpu) == XEN_INVALID_SOCKET_ID ||
cpu_to_socket(peer_cpu) == XEN_INVALID_SOCKET_ID);
+ if (opt_runqueue == OPT_RUNQUEUE_CPU)
+ continue;
if ( opt_runqueue == OPT_RUNQUEUE_ALL ||
(opt_runqueue == OPT_RUNQUEUE_CORE && same_core(peer_cpu, cpu)) ||
(opt_runqueue == OPT_RUNQUEUE_SOCKET && same_socket(peer_cpu, cpu)) ||
--
2.12.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xen: credit2: enable per cpu runqueue creation
2017-04-11 16:15 [PATCH] xen: credit2: enable per cpu runqueue creation Praveen Kumar
@ 2017-04-11 16:24 ` George Dunlap
2017-06-09 16:47 ` Dario Faggioli
2017-07-20 15:49 ` George Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: George Dunlap @ 2017-04-11 16:24 UTC (permalink / raw)
To: Praveen Kumar, george.dunlap, dario.faggioli; +Cc: xen-devel
On 11/04/17 17:15, Praveen Kumar wrote:
> The patch introduces a new command line option 'cpu' that when used will create
> runqueue per logical pCPU. This may be useful for small systems, and also for
> development, performance evalution and comparison.
>
> Signed-off-by: Praveen Kumar <kpraveen.lkml@gmail.com>
> Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Praveen,
Unfortunately this didn't get checked in before the feature freeze -- I
think I may have dropped the ball on this one.
I'll queue this one up to be merged once the Xen 4.10 development window
opens.
-George
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen: credit2: enable per cpu runqueue creation
2017-04-11 16:15 [PATCH] xen: credit2: enable per cpu runqueue creation Praveen Kumar
2017-04-11 16:24 ` George Dunlap
@ 2017-06-09 16:47 ` Dario Faggioli
2017-07-20 15:49 ` George Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: Dario Faggioli @ 2017-06-09 16:47 UTC (permalink / raw)
To: Praveen Kumar, george.dunlap; +Cc: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 4363 bytes --]
On Tue, 2017-04-11 at 21:45 +0530, Praveen Kumar wrote:
> The patch introduces a new command line option 'cpu' that when used
> will create
> runqueue per logical pCPU. This may be useful for small systems, and
> also for
> development, performance evalution and comparison.
>
> Signed-off-by: Praveen Kumar <kpraveen.lkml@gmail.com>
> Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
>
Hey Geoge,
I don't see this patch in staging, nor I think you've commented on it.
IIRC, it was sent very close to feature freeze... So, is it possible
that it fell through some crack? :-)
Any thoughts about it? If not, what about applying? :-D
Thanks and Regards,
Dario
> ---
> docs/misc/xen-command-line.markdown | 3 ++-
> xen/common/sched_credit2.c | 15 +++++++++++----
> 2 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-
> command-line.markdown
> index 5815d87dab..6e73766574 100644
> --- a/docs/misc/xen-command-line.markdown
> +++ b/docs/misc/xen-command-line.markdown
> @@ -525,7 +525,7 @@ also slow in responding to load changes.
> The default value of `1 sec` is rather long.
>
> ### credit2\_runqueue
> -> `= core | socket | node | all`
> +> `= cpu | core | socket | node | all`
>
> > Default: `socket`
>
> @@ -536,6 +536,7 @@ balancing (for instance, it will deal better with
> hyperthreading),
> but also more overhead.
>
> Available alternatives, with their meaning, are:
> +* `cpu`: one runqueue per each logical pCPUs of the host;
> * `core`: one runqueue per each physical core of the host;
> * `socket`: one runqueue per each physical socket (which often,
> but not always, matches a NUMA node) of the host;
> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
> index bb1c657e76..ee7b443f9e 100644
> --- a/xen/common/sched_credit2.c
> +++ b/xen/common/sched_credit2.c
> @@ -301,6 +301,9 @@ integer_param("credit2_balance_over",
> opt_overload_balance_tolerance);
> * want that to happen basing on topology. At the moment, it is
> possible
> * to choose to arrange runqueues to be:
> *
> + * - per-cpu: meaning that there will be one runqueue per logical
> cpu. This
> + * will happen when if the opt_runqueue parameter is set
> to 'cpu'.
> + *
> * - per-core: meaning that there will be one runqueue per each
> physical
> * core of the host. This will happen if the
> opt_runqueue
> * parameter is set to 'core';
> @@ -322,11 +325,13 @@ integer_param("credit2_balance_over",
> opt_overload_balance_tolerance);
> * either the same physical core, the same physical socket, the same
> NUMA
> * node, or just all of them, will be put together to form
> runqueues.
> */
> -#define OPT_RUNQUEUE_CORE 0
> -#define OPT_RUNQUEUE_SOCKET 1
> -#define OPT_RUNQUEUE_NODE 2
> -#define OPT_RUNQUEUE_ALL 3
> +#define OPT_RUNQUEUE_CPU 0
> +#define OPT_RUNQUEUE_CORE 1
> +#define OPT_RUNQUEUE_SOCKET 2
> +#define OPT_RUNQUEUE_NODE 3
> +#define OPT_RUNQUEUE_ALL 4
> static const char *const opt_runqueue_str[] = {
> + [OPT_RUNQUEUE_CPU] = "cpu",
> [OPT_RUNQUEUE_CORE] = "core",
> [OPT_RUNQUEUE_SOCKET] = "socket",
> [OPT_RUNQUEUE_NODE] = "node",
> @@ -682,6 +687,8 @@ cpu_to_runqueue(struct csched2_private *prv,
> unsigned int cpu)
> BUG_ON(cpu_to_socket(cpu) == XEN_INVALID_SOCKET_ID ||
> cpu_to_socket(peer_cpu) == XEN_INVALID_SOCKET_ID);
>
> + if (opt_runqueue == OPT_RUNQUEUE_CPU)
> + continue;
> if ( opt_runqueue == OPT_RUNQUEUE_ALL ||
> (opt_runqueue == OPT_RUNQUEUE_CORE &&
> same_core(peer_cpu, cpu)) ||
> (opt_runqueue == OPT_RUNQUEUE_SOCKET &&
> same_socket(peer_cpu, cpu)) ||
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen: credit2: enable per cpu runqueue creation
2017-04-11 16:15 [PATCH] xen: credit2: enable per cpu runqueue creation Praveen Kumar
2017-04-11 16:24 ` George Dunlap
2017-06-09 16:47 ` Dario Faggioli
@ 2017-07-20 15:49 ` George Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: George Dunlap @ 2017-07-20 15:49 UTC (permalink / raw)
To: Praveen Kumar, george.dunlap, dario.faggioli; +Cc: xen-devel
On 04/11/2017 05:15 PM, Praveen Kumar wrote:
> The patch introduces a new command line option 'cpu' that when used will create
> runqueue per logical pCPU. This may be useful for small systems, and also for
> development, performance evalution and comparison.
>
> Signed-off-by: Praveen Kumar <kpraveen.lkml@gmail.com>
> Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
OK, I've pushed this. Sorry again for missing the 4.9 window.
-George
>
> ---
> docs/misc/xen-command-line.markdown | 3 ++-
> xen/common/sched_credit2.c | 15 +++++++++++----
> 2 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
> index 5815d87dab..6e73766574 100644
> --- a/docs/misc/xen-command-line.markdown
> +++ b/docs/misc/xen-command-line.markdown
> @@ -525,7 +525,7 @@ also slow in responding to load changes.
> The default value of `1 sec` is rather long.
>
> ### credit2\_runqueue
> -> `= core | socket | node | all`
> +> `= cpu | core | socket | node | all`
>
> > Default: `socket`
>
> @@ -536,6 +536,7 @@ balancing (for instance, it will deal better with hyperthreading),
> but also more overhead.
>
> Available alternatives, with their meaning, are:
> +* `cpu`: one runqueue per each logical pCPUs of the host;
> * `core`: one runqueue per each physical core of the host;
> * `socket`: one runqueue per each physical socket (which often,
> but not always, matches a NUMA node) of the host;
> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
> index bb1c657e76..ee7b443f9e 100644
> --- a/xen/common/sched_credit2.c
> +++ b/xen/common/sched_credit2.c
> @@ -301,6 +301,9 @@ integer_param("credit2_balance_over", opt_overload_balance_tolerance);
> * want that to happen basing on topology. At the moment, it is possible
> * to choose to arrange runqueues to be:
> *
> + * - per-cpu: meaning that there will be one runqueue per logical cpu. This
> + * will happen when if the opt_runqueue parameter is set to 'cpu'.
> + *
> * - per-core: meaning that there will be one runqueue per each physical
> * core of the host. This will happen if the opt_runqueue
> * parameter is set to 'core';
> @@ -322,11 +325,13 @@ integer_param("credit2_balance_over", opt_overload_balance_tolerance);
> * either the same physical core, the same physical socket, the same NUMA
> * node, or just all of them, will be put together to form runqueues.
> */
> -#define OPT_RUNQUEUE_CORE 0
> -#define OPT_RUNQUEUE_SOCKET 1
> -#define OPT_RUNQUEUE_NODE 2
> -#define OPT_RUNQUEUE_ALL 3
> +#define OPT_RUNQUEUE_CPU 0
> +#define OPT_RUNQUEUE_CORE 1
> +#define OPT_RUNQUEUE_SOCKET 2
> +#define OPT_RUNQUEUE_NODE 3
> +#define OPT_RUNQUEUE_ALL 4
> static const char *const opt_runqueue_str[] = {
> + [OPT_RUNQUEUE_CPU] = "cpu",
> [OPT_RUNQUEUE_CORE] = "core",
> [OPT_RUNQUEUE_SOCKET] = "socket",
> [OPT_RUNQUEUE_NODE] = "node",
> @@ -682,6 +687,8 @@ cpu_to_runqueue(struct csched2_private *prv, unsigned int cpu)
> BUG_ON(cpu_to_socket(cpu) == XEN_INVALID_SOCKET_ID ||
> cpu_to_socket(peer_cpu) == XEN_INVALID_SOCKET_ID);
>
> + if (opt_runqueue == OPT_RUNQUEUE_CPU)
> + continue;
> if ( opt_runqueue == OPT_RUNQUEUE_ALL ||
> (opt_runqueue == OPT_RUNQUEUE_CORE && same_core(peer_cpu, cpu)) ||
> (opt_runqueue == OPT_RUNQUEUE_SOCKET && same_socket(peer_cpu, cpu)) ||
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-20 15:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 16:15 [PATCH] xen: credit2: enable per cpu runqueue creation Praveen Kumar
2017-04-11 16:24 ` George Dunlap
2017-06-09 16:47 ` Dario Faggioli
2017-07-20 15:49 ` George Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).