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.


Add swapping and pinning capability to Palacios
[palacios.git] / linux_module / palacios-vnet.c
index c1111ef..4b23772 100644 (file)
@@ -14,8 +14,8 @@
 #include <linux/timer.h>
 
 #include <vnet/vnet.h>
-#include "mm.h"
 #include "palacios.h"
+#include "mm.h"
 #include "palacios-vnet.h"
 #include "linux-exts.h"
 
@@ -139,6 +139,12 @@ host_del_timer(void * vnet_timer){
 }
 
 
+static void *
+host_allocate_pages(int num_pages, unsigned int alignment, int node_id, int constraint)
+{
+    // allocates pages preferentially on the caller's node
+    return palacios_allocate_pages(num_pages, alignment, node_id, constraint);
+}
 
 
 
@@ -164,8 +170,8 @@ static struct vnet_host_hooks vnet_host_hooks = {
     .mutex_lock_irqsave         = palacios_mutex_lock_irqsave, 
     .mutex_unlock_irqrestore    = palacios_mutex_unlock_irqrestore,
 
-    .print                     = palacios_print,
-    .allocate_pages            = palacios_allocate_pages,
+    .print                     = palacios_print_scoped,
+    .allocate_pages            = host_allocate_pages,
     .free_pages                        = palacios_free_pages,
     .malloc                    = palacios_alloc,
     .free                      = palacios_free,