From: Rusty Russell Date: Wed, 28 Jul 2010 13:40:58 +0000 (+0930) Subject: alloc: reduce number of large pages to 256. X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=bbd7380019f3ea4629d170af24b902bf734c83ea;hp=fbd94d9909892758d594d410bb5f981b3567fb3e alloc: reduce number of large pages to 256. This reduces the number of huge allocs, which drops test time from 6 minutes to 57 seconds. --- diff --git a/ccan/alloc/alloc.c b/ccan/alloc/alloc.c index 693943ae..b4235d0e 100644 --- a/ccan/alloc/alloc.c +++ b/ccan/alloc/alloc.c @@ -35,7 +35,7 @@ */ /* We divide the pool into this many large pages (nearest power of 2) */ -#define MAX_LARGE_PAGES (1024UL) +#define MAX_LARGE_PAGES (256UL) /* 32 small pages == 1 large page. */ #define BITS_FROM_SMALL_TO_LARGE_PAGE 5 diff --git a/ccan/alloc/test/run.c b/ccan/alloc/test/run.c index e75eddbf..a6d021ff 100644 --- a/ccan/alloc/test/run.c +++ b/ccan/alloc/test/run.c @@ -164,7 +164,7 @@ static void test(unsigned int pool_size) int main(int argc, char *argv[]) { - plan_tests(480); + plan_tests(440); /* Large test. */ test(MIN_USEFUL_SIZE * 2);