Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Use passed in options to set scheduler
[palacios.git] / palacios / src / palacios / vmm_scheduler.c
index ab5dbef..40557a1 100644 (file)
@@ -81,10 +81,20 @@ struct vm_scheduler_impl *v3_scheduler_lookup(char *name)
 }
 
 int V3_enable_scheduler() {
-    /* XXX Lookup the specified scheduler to use for palacios and use it */
-    
-    scheduler = v3_scheduler_lookup(default_strategy);
-    PrintDebug(VM_NONE, VCORE_NONE,"Sched. Scheduler %s found",scheduler->name);
+    char *sched_name;
+
+    scheduler = NULL;
+    sched_name = v3_lookup_option("scheduler");
+
+    if (!sched_name) {
+       scheduler = v3_scheduler_lookup(sched_name);
+    } 
+
+    if (!scheduler) {
+        scheduler = v3_scheduler_lookup(default_strategy);
+    }
+
+    PrintDebug(VM_NONE, VCORE_NONE,"Scheduler %s found",scheduler->name);
     
     if (!scheduler) {
        PrintError(VM_NONE, VCORE_NONE,"Specified Palacios scheduler \"%s\" not found.\n", default_strategy);