| version 1.93.2.1, 2004/06/22 08:58:42 |
version 1.94, 2004/04/25 16:42:41 |
| Line 357 pr_rmpage(struct pool *pp, struct pool_i |
|
| Line 357 pr_rmpage(struct pool *pp, struct pool_i |
|
| } |
} |
| |
|
| /* |
/* |
| |
* Initialize all the pools listed in the "pools" link set. |
| |
*/ |
| |
void |
| |
link_pool_init(void) |
| |
{ |
| |
__link_set_decl(pools, struct link_pool_init); |
| |
struct link_pool_init * const *pi; |
| |
|
| |
__link_set_foreach(pi, pools) |
| |
pool_init((*pi)->pp, (*pi)->size, (*pi)->align, |
| |
(*pi)->align_offset, (*pi)->flags, (*pi)->wchan, |
| |
(*pi)->palloc); |
| |
} |
| |
|
| |
/* |
| * Initialize the given pool resource structure. |
* Initialize the given pool resource structure. |
| * |
* |
| * We export this routine to allow other kernel parts to declare |
* We export this routine to allow other kernel parts to declare |
| Line 957 pool_do_put(struct pool *pp, void *v) |
|
| Line 972 pool_do_put(struct pool *pp, void *v) |
|
| * If this page is now empty, do one of two things: |
* If this page is now empty, do one of two things: |
| * |
* |
| * (1) If we have more pages than the page high water mark, |
* (1) If we have more pages than the page high water mark, |
| * free the page back to the system. ONLY CONSIDER |
* or if we are flagged as immediately freeing back idle |
| |
* pages, free the page back to the system. ONLY CONSIDER |
| * FREEING BACK A PAGE IF WE HAVE MORE THAN OUR MINIMUM PAGE |
* FREEING BACK A PAGE IF WE HAVE MORE THAN OUR MINIMUM PAGE |
| * CLAIM. |
* CLAIM. |
| * |
* |
| Line 970 pool_do_put(struct pool *pp, void *v) |
|
| Line 986 pool_do_put(struct pool *pp, void *v) |
|
| pp->pr_nidle++; |
pp->pr_nidle++; |
| if (pp->pr_npages > pp->pr_minpages && |
if (pp->pr_npages > pp->pr_minpages && |
| (pp->pr_npages > pp->pr_maxpages || |
(pp->pr_npages > pp->pr_maxpages || |
| |
(pp->pr_roflags & PR_IMMEDRELEASE) != 0 || |
| (pp->pr_alloc->pa_flags & PA_WANT) != 0)) { |
(pp->pr_alloc->pa_flags & PA_WANT) != 0)) { |
| simple_unlock(&pp->pr_slock); |
simple_unlock(&pp->pr_slock); |
| pr_rmpage(pp, ph, NULL); |
pr_rmpage(pp, ph, NULL); |