diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c
index 69ac871..3b7294f 100644
--- a/src/vppinfra/linux/mem.c
+++ b/src/vppinfra/linux/mem.c
@@ -386,21 +386,59 @@
 clib_error_t *
 clib_mem_vm_ext_map (clib_mem_vm_map_t * a)
 {
+  long unsigned int old_mask[16] = { 0 };
   int mmap_flags = MAP_SHARED;
+  clib_error_t *err = 0;
+  int old_mpol = -1;
   void *addr;
+  int rv;
+
+  if (a->numa_node)
+    {
+      rv = get_mempolicy (&old_mpol, old_mask, sizeof (old_mask) * 8 + 1, 0,
+			  0);
+
+      if (rv == -1)
+	{
+	  err = clib_error_return_unix (0, "get_mempolicy");
+	  goto done;
+	}
+    }
 
   if (a->requested_va)
     mmap_flags |= MAP_FIXED;
 
+  if (old_mpol != -1)
+    {
+      long unsigned int mask[16] = { 0 };
+      mask[0] = 1 << a->numa_node;
+      rv = set_mempolicy (MPOL_BIND, mask, sizeof (mask) * 8 + 1);
+      if (rv == -1)
+	{
+	  err = clib_error_return_unix (0, "set_mempolicy");
+	  goto done;
+	}
+    }
+
   addr = (void *) mmap (uword_to_pointer (a->requested_va, void *), a->size,
 			PROT_READ | PROT_WRITE, mmap_flags, a->fd, 0);
 
   if (addr == MAP_FAILED)
     return clib_error_return_unix (0, "mmap");
 
+  /* re-apply old numa memory policy */
+  if (old_mpol != -1 &&
+      set_mempolicy (old_mpol, old_mask, sizeof (old_mask) * 8 + 1) == -1)
+    {
+      err = clib_error_return_unix (0, "set_mempolicy");
+      goto done;
+    }
+
   a->addr = addr;
   CLIB_MEM_UNPOISON (addr, a->size);
-  return 0;
+
+done:
+  return err;
 }
 
 /*
diff --git a/src/vppinfra/mem.h b/src/vppinfra/mem.h
index 0367c4a..f35c495 100644
--- a/src/vppinfra/mem.h
+++ b/src/vppinfra/mem.h
@@ -455,6 +455,7 @@
   int fd;		/**< File descriptor to be mapped */
   uword requested_va;	/**< Request fixed position mapping */
   void *addr;		/**< Pointer to mapped memory, if successful */
+  u8 numa_node;
 } clib_mem_vm_map_t;
 
 clib_error_t *clib_mem_vm_ext_map (clib_mem_vm_map_t * a);
