| version 1.52, 2001/05/09 23:46:03 |
version 1.53, 2001/05/10 01:37:40 |
| Line 103 struct pool_item { |
|
| Line 103 struct pool_item { |
|
| #define PR_HASH_INDEX(pp,addr) \ |
#define PR_HASH_INDEX(pp,addr) \ |
| (((u_long)(addr) >> (pp)->pr_pageshift) & (PR_HASHTABSIZE - 1)) |
(((u_long)(addr) >> (pp)->pr_pageshift) & (PR_HASHTABSIZE - 1)) |
| |
|
| |
#define POOL_NEEDS_CATCHUP(pp) \ |
| |
((pp)->pr_nitems < (pp)->pr_minitems) |
| |
|
| /* |
/* |
| * Pool cache management. |
* Pool cache management. |
| * |
* |
| Line 775 _pool_get(struct pool *pp, int flags, co |
|
| Line 778 _pool_get(struct pool *pp, int flags, co |
|
| * If we have a low water mark and we are now below that low |
* If we have a low water mark and we are now below that low |
| * water mark, add more items to the pool. |
* water mark, add more items to the pool. |
| */ |
*/ |
| if (pp->pr_nitems < pp->pr_minitems && pool_catchup(pp) != 0) { |
if (POOL_NEEDS_CATCHUP(pp) && pool_catchup(pp) != 0) { |
| /* |
/* |
| * XXX: Should we log a warning? Should we set up a timeout |
* XXX: Should we log a warning? Should we set up a timeout |
| * to try again in a second or so? The latter could break |
* to try again in a second or so? The latter could break |
| Line 1083 pool_setlowat(struct pool *pp, int n) |
|
| Line 1086 pool_setlowat(struct pool *pp, int n) |
|
| : roundup(n, pp->pr_itemsperpage) / pp->pr_itemsperpage; |
: roundup(n, pp->pr_itemsperpage) / pp->pr_itemsperpage; |
| |
|
| /* Make sure we're caught up with the newly-set low water mark. */ |
/* Make sure we're caught up with the newly-set low water mark. */ |
| if ((pp->pr_nitems < pp->pr_minitems) && |
if (POOL_NEEDS_CATCHUP(pp) && (error = pool_catchup(pp) != 0)) { |
| (error = pool_catchup(pp)) != 0) { |
|
| /* |
/* |
| * XXX: Should we log a warning? Should we set up a timeout |
* XXX: Should we log a warning? Should we set up a timeout |
| * to try again in a second or so? The latter could break |
* to try again in a second or so? The latter could break |