summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-08-14 05:13:24 +0000
committerdelphij <delphij@FreeBSD.org>2014-08-14 05:13:24 +0000
commitff6721bf36940d5c0580ad3a04689cd9d01ee3db (patch)
treea6cc0f8fc3cf10592d6fe4011394e53292967469 /sys/kern/kern_malloc.c
parent53369652fd9c456d33338f450a0c02cfdc1db689 (diff)
downloadFreeBSD-src-ff6721bf36940d5c0580ad3a04689cd9d01ee3db.zip
FreeBSD-src-ff6721bf36940d5c0580ad3a04689cd9d01ee3db.tar.gz
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
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 464303a..4e8a3bd 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},
};
OpenPOWER on IntegriCloud