From: Peter Dinda Date: Wed, 7 Aug 2013 22:48:38 +0000 (-0500) Subject: VNET compatibility with NUMA interfaces X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=07223cf503e20ccd3f09754a614a1c107b018cd0 VNET compatibility with NUMA interfaces --- diff --git a/linux_module/main.c b/linux_module/main.c index 0f0325a..79b6280 100644 --- a/linux_module/main.c +++ b/linux_module/main.c @@ -232,7 +232,7 @@ static struct file_operations v3_ctrl_fops = { struct proc_dir_entry *palacios_get_procdir(void) { - INFO("Returning procdir=%p\n",palacios_proc_dir); + // INFO("Returning procdir=%p\n",palacios_proc_dir); return palacios_proc_dir; } diff --git a/linux_module/palacios-vnet-ctrl.c b/linux_module/palacios-vnet-ctrl.c index 5c93941..86ec129 100644 --- a/linux_module/palacios-vnet-ctrl.c +++ b/linux_module/palacios-vnet-ctrl.c @@ -975,7 +975,7 @@ static void destroy_proc_files(void) { remove_proc_entry("links", vnet_root); remove_proc_entry("routes", vnet_root); remove_proc_entry("stats", vnet_root); - remove_proc_entry("vnet", NULL); + remove_proc_entry("vnet", palacios_get_procdir()); } diff --git a/linux_module/palacios-vnet.c b/linux_module/palacios-vnet.c index bdc88a1..077eeda 100644 --- a/linux_module/palacios-vnet.c +++ b/linux_module/palacios-vnet.c @@ -14,8 +14,8 @@ #include #include -#include "mm.h" #include "palacios.h" +#include "mm.h" #include "palacios-vnet.h" #include "linux-exts.h" @@ -139,6 +139,14 @@ host_del_timer(void * vnet_timer){ } +static void * +host_allocate_pages(int num_pages, unsigned int alignment) +{ + // allocates pages preferentially on the caller's node + return palacios_allocate_pages(num_pages, alignment, -1); +} + + static struct vnet_host_hooks vnet_host_hooks = { .timer_create = host_create_timer, @@ -163,7 +171,7 @@ static struct vnet_host_hooks vnet_host_hooks = { .mutex_unlock_irqrestore = palacios_mutex_unlock_irqrestore, .print = palacios_print_scoped, - .allocate_pages = palacios_allocate_pages, + .allocate_pages = host_allocate_pages, .free_pages = palacios_free_pages, .malloc = palacios_alloc, .free = palacios_free,