diff options
author | Ed Warnicke <eaw@cisco.com> | 2015-12-13 16:43:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@projectrotterdam.info> | 2015-12-13 16:43:54 +0000 |
commit | 29726ab117a1fc5b3d92d1afaaaaa08ef7f138eb (patch) | |
tree | 678e9edc335c3c747cf0d0daf2a37d4c43d84aef | |
parent | 261e9fffd58268f6ce3d9b80da11f50217113219 (diff) | |
parent | 95bb883a62b5b4da53c5082ae93ccc3bfd867467 (diff) |
Merge "Handle large user-mode page sizes, tested to 64k"
-rw-r--r-- | svm/svm.c | 5 | ||||
-rw-r--r-- | svm/svm.h | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -632,7 +632,10 @@ static void svm_region_init_internal (char *root_path) atexit(svm_mutex_cleanup); /* Randomize the shared-VM base at init time */ - randomize_baseva = (ticks & 15) * 4096; + if (MMAP_PAGESIZE <= (4<<10)) + randomize_baseva = (ticks & 15) * MMAP_PAGESIZE; + else + randomize_baseva = (ticks & 3) * MMAP_PAGESIZE; vec_validate(a,0); a->root_path = root_path; @@ -25,7 +25,7 @@ #include <vppinfra/clib.h> #include <vppinfra/mem.h> -#define MMAP_PAGESIZE (4<<10) +#define MMAP_PAGESIZE (clib_mem_get_page_size()) #define SVM_VERSION ((1<<16) | 1) /* set to declare region ready. */ @@ -34,7 +34,7 @@ #define SVM_FLAGS_NODATA (1<<2) /* region will be further subdivided */ #define SVM_FLAGS_NEED_DATA_INIT (1<<3) -#define SVM_PVT_MHEAP_SIZE (32<<10) /* region's private mheap (32k) */ +#define SVM_PVT_MHEAP_SIZE (128<<10) /* region's private mheap (128k) */ typedef struct svm_region_ { volatile uword version; |