xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Jonathan Creekmore <jonathan.creekmore@gmail.com>,
	Doug Goldstein <cardoe@cardoe.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: [PATCH] xen: sched: use default scheduler upon an invalid "sched="
Date: Fri, 17 Jun 2016 12:31:00 +0200	[thread overview]
Message-ID: <146615946048.6946.4091765859113840716.stgit@Solace.fritz.box> (raw)

instead of just the first scheduler we find in the array.

In fact, right now, if someone makes a typo when passing
the "sched=" command line option to Xen, we (with all
schedulers configured in) pick ARINC653, which is most
likely not what one would expect.

Go for the default scheduler instead.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Doug Goldstein <cardoe@cardoe.com>
Cc: Jonathan Creekmore <jonathan.creekmore@gmail.com>
I don't think I'm going to ask for this to be put in 4.7,
as I don't want to give Wei an heart attack... :-)

Considering it for backporting should be enough, IMO.
 xen/common/schedule.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 5e35310..7ac12d3 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -1625,7 +1625,8 @@ void __init scheduler_init(void)
         printk("Could not find scheduler: %s\n", opt_sched);
         for ( i = 0; i < NUM_SCHEDULERS; i++ )
-            if ( schedulers[i] )
+            if ( schedulers[i] &&
+                 !strcmp(schedulers[i]->opt_name, CONFIG_SCHED_DEFAULT) )
                 ops = *schedulers[i];

Xen-devel mailing list

             reply	other threads:[~2016-06-17 10:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17 10:31 Dario Faggioli [this message]
2016-06-17 10:55 ` Andrew Cooper
2016-06-17 13:42 ` Jonathan Creekmore
2016-06-17 14:06 ` George Dunlap
2016-06-17 14:07 ` Doug Goldstein
2016-06-17 14:27 ` Wei Liu

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:

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

  git send-email \
    --in-reply-to=146615946048.6946.4091765859113840716.stgit@Solace.fritz.box \
    --to=dario.faggioli@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jonathan.creekmore@gmail.com \
    --cc=xen-devel@lists.xenproject.org \
    --subject='Re: [PATCH] xen: sched: use default scheduler upon an invalid "sched="' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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