Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/kern/subr_pool.c,v retrieving revision 1.156.2.2 retrieving revision 1.157 diff -u -p -r1.156.2.2 -r1.157 --- src/sys/kern/subr_pool.c 2008/06/04 02:05:39 1.156.2.2 +++ src/sys/kern/subr_pool.c 2008/04/24 11:38:36 1.157 @@ -1,7 +1,7 @@ -/* $NetBSD: subr_pool.c,v 1.156.2.2 2008/06/04 02:05:39 yamt Exp $ */ +/* $NetBSD: subr_pool.c,v 1.157 2008/04/24 11:38:36 ad Exp $ */ /*- - * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008 The NetBSD Foundation, Inc. + * Copyright (c) 1997, 1999, 2000, 2002, 2007 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -16,6 +16,13 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -31,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.156.2.2 2008/06/04 02:05:39 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.157 2008/04/24 11:38:36 ad Exp $"); #include "opt_ddb.h" #include "opt_pool.h" @@ -2369,7 +2376,7 @@ pool_cache_cpu_enter(pool_cache_t pc, in * CPU-local data. To avoid touching shared state, we * pull the neccessary information from CPU local data. */ - KPREEMPT_DISABLE(curlwp); + crit_enter(); cc = pc->pc_cpus[curcpu()->ci_index]; KASSERT(cc->cc_cache == pc); if (cc->cc_ipl != IPL_NONE) { @@ -2387,10 +2394,13 @@ pool_cache_cpu_exit(pool_cache_cpu_t *cc if (cc->cc_ipl != IPL_NONE) { splx(*s); } - KPREEMPT_ENABLE(curlwp); + crit_exit(); } -pool_cache_cpu_t * __noinline +#if __GNUC_PREREQ__(3, 0) +__attribute ((noinline)) +#endif +pool_cache_cpu_t * pool_cache_get_slow(pool_cache_cpu_t *cc, int *s, void **objectp, paddr_t *pap, int flags) { @@ -2541,7 +2551,10 @@ pool_cache_get_paddr(pool_cache_t pc, in return object; } -pool_cache_cpu_t * __noinline +#if __GNUC_PREREQ__(3, 0) +__attribute ((noinline)) +#endif +pool_cache_cpu_t * pool_cache_put_slow(pool_cache_cpu_t *cc, int *s, void *object, paddr_t pa) { pcg_t *pcg, *cur;