From: dlg Date: Mon, 22 Dec 2014 00:33:40 +0000 (+0000) Subject: if we're able to use large page allocators, try and place at least X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=210a7536047638d0b87ab2abc3592e72fa1419ca;p=openbsd if we're able to use large page allocators, try and place at least 8 items on a page. this reduces the number of allocator operations we have to do per item on large items. ok tedu@ --- diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index d8866a519d8..c98db829cc0 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.172 2014/12/19 02:49:07 dlg Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.173 2014/12/22 00:33:40 dlg Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -232,7 +232,7 @@ pool_init(struct pool *pp, size_t size, u_int align, u_int ioff, int flags, size = roundup(size, align); if (palloc == NULL) { - while (size > pgsize) + while (size * 8 > pgsize) pgsize <<= 1; if (pgsize > PAGE_SIZE) {