[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.7] sched: use default scheduler upon an invalid "sched="



commit 22ec3496112cb1011b6ccd1c0181f2fc107c033e
Author:     Dario Faggioli <dario.faggioli@xxxxxxxxxx>
AuthorDate: Mon Jul 4 12:33:45 2016 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Jul 4 12:33:45 2016 +0200

    sched: use default scheduler upon an invalid "sched="
    
    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@xxxxxxxxxx>
    Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-By: Jonathan Creekmore <jonathan.creekmore@xxxxxxxxx>
    master commit: 9dec2c47406f4ef31711656722f5f70d758d6160
    master date: 2016-06-17 15:08:08 +0100
---
 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];
                 break;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.7

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.