diff options
author | 2017-06-23 01:21:55 +0000 | |
---|---|---|
committer | 2017-06-23 01:21:55 +0000 | |
commit | 908b79cbbe8da7a8acef93f11e4f23059ae8d8a6 (patch) | |
tree | 14f546fd53d1a9b20555075066b0de3c7d463205 | |
parent | change the semantic for calculating when to grow the size of a cache list. (diff) | |
download | wireguard-openbsd-908b79cbbe8da7a8acef93f11e4f23059ae8d8a6.tar.xz wireguard-openbsd-908b79cbbe8da7a8acef93f11e4f23059ae8d8a6.zip |
set the alignment of the per cpu cache structures to CACHELINESIZE.
hardcoding 64 is too optimistic.
-rw-r--r-- | sys/kern/subr_pool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index f2af8219c44..9f1bbae3923 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.216 2017/06/23 01:02:18 dlg Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.217 2017/06/23 01:21:55 dlg Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -1635,8 +1635,8 @@ pool_cache_init(struct pool *pp) struct cpumem_iter i; if (pool_caches.pr_size == 0) { - pool_init(&pool_caches, sizeof(struct pool_cache), 64, - IPL_NONE, PR_WAITOK, "plcache", NULL); + pool_init(&pool_caches, sizeof(struct pool_cache), + CACHELINESIZE, IPL_NONE, PR_WAITOK, "plcache", NULL); } /* must be able to use the pool items as cache list items */ |