From e5a5ec13bbf60050f2dd7d0bfcacc746b0117e97 Mon Sep 17 00:00:00 2001 From: Sparchatus Date: Wed, 13 Apr 2022 13:38:35 +0000 Subject: [PATCH] Even more effective multu thred testing and dirty fix for paging slab stealing issue --- lib/aos/paging.c | 4 ++-- usr/mallocator/main.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/aos/paging.c b/lib/aos/paging.c index d8a919c..30b7c8d 100644 --- a/lib/aos/paging.c +++ b/lib/aos/paging.c @@ -21,8 +21,8 @@ #include #include -#define PT_PT_SLAB_MIN_SPACE 18 -#define PT_CHILDREN_SLAB_MIN_SPACE 12 +#define PT_PT_SLAB_MIN_SPACE 256 +#define PT_CHILDREN_SLAB_MIN_SPACE 256 #define PT_META_MAX_SIZE MAX(sizeof(struct pt_t), sizeof(struct pt_vaddr_reg_t)) #define PT_PT_SLAB_INITIAL_SPACE SLAB_STATIC_SIZE(PT_PT_SLAB_MIN_SPACE, PT_META_MAX_SIZE) diff --git a/usr/mallocator/main.c b/usr/mallocator/main.c index 24961f4..cf8a34f 100644 --- a/usr/mallocator/main.c +++ b/usr/mallocator/main.c @@ -27,8 +27,6 @@ static struct thread* threads[NUM_THREADS]; __attribute__((__used__)) static int test_large_buffer(void * __args) { - barrelfish_usleep(rand() % 50 * 100000); - //allocate a 256 MiB buffer debug_printf("allocating 256MiB buffer\n"); char * big_buf = malloc(1<<28); @@ -36,6 +34,7 @@ static int test_large_buffer(void * __args) { //only write to a small part of the large buffer for (int i = 0; i < (1 << 16); i += (1 << 12)) { + barrelfish_usleep(rand() % 10 * 100000); big_buf[i] = 'b'; }