diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-07-18 10:47:58 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-07-18 10:47:58 +0000 |
commit | ec38b344cb6aa983e57f27c52a5a75084e5ae9c2 (patch) | |
tree | bcc30ab6e5251465bb34f2340ddb08d968c1e1d2 /sys/vm/swap_pager.h | |
parent | 567104a1485ba7e76069976c365b6938aa83fe91 (diff) |
Move the implementation of the vmspace_swap_count() (used only in
the "toss the largest process" emergency handling) from vm_map.c to
swap_pager.c.
The quantity calculated depends strongly on the internals of the
swap_pager and by moving it, we no longer need to expose the
internal metrics of the swap_pager to the world.
Notes
Notes:
svn path=/head/; revision=117724
Diffstat (limited to 'sys/vm/swap_pager.h')
-rw-r--r-- | sys/vm/swap_pager.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/sys/vm/swap_pager.h b/sys/vm/swap_pager.h index 34d5bb10afa5..c0aa1b16dae4 100644 --- a/sys/vm/swap_pager.h +++ b/sys/vm/swap_pager.h @@ -65,33 +65,6 @@ struct swdevt { #ifdef _KERNEL -/* - * SWB_NPAGES must be a power of 2. It may be set to 1, 2, 4, 8, or 16 - * pages per allocation. We recommend you stick with the default of 8. - * The 16-page limit is due to the radix code (kern/subr_blist.c). - */ -#ifndef MAX_PAGEOUT_CLUSTER -#define MAX_PAGEOUT_CLUSTER 16 -#endif - -#if !defined(SWB_NPAGES) -#define SWB_NPAGES MAX_PAGEOUT_CLUSTER -#endif - -/* - * Piecemeal swap metadata structure. Swap is stored in a radix tree. - * - * If SWB_NPAGES is 8 and sizeof(char *) == sizeof(daddr_t), our radix - * is basically 8. Assuming PAGE_SIZE == 4096, one tree level represents - * 32K worth of data, two levels represent 256K, three levels represent - * 2 MBytes. This is acceptable. - * - * Overall memory utilization is about the same as the old swap structure. - */ -#define SWCORRECT(n) (sizeof(void *) * (n) / sizeof(daddr_t)) -#define SWAP_META_PAGES (SWB_NPAGES * 2) -#define SWAP_META_MASK (SWAP_META_PAGES - 1) - extern int swap_pager_full; extern int vm_swap_size; |