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.112.4.1 retrieving revision 1.113 diff -u -p -r1.112.4.1 -r1.113 --- src/sys/kern/subr_pool.c 2006/04/19 05:14:00 1.112.4.1 +++ src/sys/kern/subr_pool.c 2006/03/17 10:09:25 1.113 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.112.4.1 2006/04/19 05:14:00 elad Exp $ */ +/* $NetBSD: subr_pool.c,v 1.113 2006/03/17 10:09:25 yamt Exp $ */ /*- * Copyright (c) 1997, 1999, 2000 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.112.4.1 2006/04/19 05:14:00 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.113 2006/03/17 10:09:25 yamt Exp $"); #include "opt_pool.h" #include "opt_poollog.h" @@ -468,27 +468,13 @@ void pool_init(struct pool *pp, size_t size, u_int align, u_int ioff, int flags, const char *wchan, struct pool_allocator *palloc) { -#ifdef DEBUG - struct pool *pp1; -#endif + int off, slack; size_t trysize, phsize; - int off, slack, s; + int s; KASSERT((1UL << (CHAR_BIT * sizeof(pool_item_freelist_t))) - 2 >= PHPOOL_FREELIST_NELEM(PHPOOL_MAX - 1)); -#ifdef DEBUG - /* - * Check that the pool hasn't already been initialised and - * added to the list of all pools. - */ - LIST_FOREACH(pp1, &pool_head, pr_poollist) { - if (pp == pp1) - panic("pool_init: pool %s already initialised", - wchan); - } -#endif - #ifdef POOL_DIAGNOSTIC /* * Always log if POOL_DIAGNOSTIC is defined. @@ -1234,6 +1220,7 @@ pool_grow(struct pool *pp, int flags) simple_lock(&pp->pr_slock); pool_prime_page(pp, cp, ph); pp->pr_npagealloc++; + pp->pr_minpages++; return 0; } @@ -1543,8 +1530,7 @@ pool_drain(void *arg) drainpp = LIST_NEXT(pp, pr_poollist); } simple_unlock(&pool_head_slock); - if (pp) - pool_reclaim(pp); + pool_reclaim(pp); splx(s); }