diff options
author | Xin LI <delphij@FreeBSD.org> | 2014-08-14 05:13:24 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2014-08-14 05:13:24 +0000 |
commit | bda06553fd2a63cac5db3767b1c287c9ce3f72f5 (patch) | |
tree | a6cc0f8fc3cf10592d6fe4011394e53292967469 /sys/kern/kern_malloc.c | |
parent | 477867a0e59a281882fe5ba1b0276c4d1a50f965 (diff) | |
download | src-bda06553fd2a63cac5db3767b1c287c9ce3f72f5.tar.gz src-bda06553fd2a63cac5db3767b1c287c9ce3f72f5.zip |
Re-instate UMA cached backend for 4K - 64K allocations. New consumers
like geli(4) uses malloc(9) to allocate temporary buffers that gets
free'ed shortly, causing frequent TLB shootdown as observed in hwpmc
supported flame graph.
Discussed with: jeff, alfred
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=269963
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r-- | sys/kern/kern_malloc.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 464303a0fa42..4e8a3bdc0b6a 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -120,7 +120,7 @@ static int kmemcount; #define KMEM_ZBASE 16 #define KMEM_ZMASK (KMEM_ZBASE - 1) -#define KMEM_ZMAX PAGE_SIZE +#define KMEM_ZMAX 65536 #define KMEM_ZSIZE (KMEM_ZMAX >> KMEM_ZSHIFT) static uint8_t kmemsize[KMEM_ZSIZE + 1]; @@ -151,21 +151,10 @@ struct { {1024, "1024", }, {2048, "2048", }, {4096, "4096", }, -#if PAGE_SIZE > 4096 {8192, "8192", }, -#if PAGE_SIZE > 8192 {16384, "16384", }, -#if PAGE_SIZE > 16384 {32768, "32768", }, -#if PAGE_SIZE > 32768 {65536, "65536", }, -#if PAGE_SIZE > 65536 -#error "Unsupported PAGE_SIZE" -#endif /* 65536 */ -#endif /* 32768 */ -#endif /* 16384 */ -#endif /* 8192 */ -#endif /* 4096 */ {0, NULL}, }; |