summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_pageout.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2005-11-09 08:19:21 +0000
committeralc <alc@FreeBSD.org>2005-11-09 08:19:21 +0000
commit8852c8f9e25ac6d124a51b1e330993a5ba1bcafa (patch)
tree62e83f535ea20fe619830cadd0ca11c77e61b37f /sys/vm/vm_pageout.c
parentf9da852761f4d4f96009496cf662d42d998c42a6 (diff)
downloadFreeBSD-src-8852c8f9e25ac6d124a51b1e330993a5ba1bcafa.zip
FreeBSD-src-8852c8f9e25ac6d124a51b1e330993a5ba1bcafa.tar.gz
Reimplement the reclamation of PV entries. Specifically, perform
reclamation synchronously from get_pv_entry() instead of asynchronously as part of the page daemon. Additionally, limit the reclamation to inactive pages unless allocation from the PV entry zone or reclamation from the inactive queue fails. Previously, reclamation destroyed mappings to both inactive and active pages. get_pv_entry() still, however, wakes up the page daemon when reclamation occurs. The reason being that the page daemon may move some pages from the active queue to the inactive queue, making some new pages available to future reclamations. Print the "reclaiming PV entries" message at most once per minute, but don't stop printing it after the fifth time. This way, we do not give the impression that the problem has gone away. Reviewed by: tegge
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r--sys/vm/vm_pageout.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 6860dd6..0a56ca1 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -113,7 +113,6 @@ __FBSDID("$FreeBSD$");
/* the kernel process "vm_pageout"*/
static void vm_pageout(void);
static int vm_pageout_clean(vm_page_t);
-static void vm_pageout_pmap_collect(void);
static void vm_pageout_scan(int pass);
struct proc *pageproc;
@@ -667,35 +666,6 @@ vm_pageout_map_deactivate_pages(map, desired)
#endif /* !defined(NO_SWAPPING) */
/*
- * This routine is very drastic, but can save the system
- * in a pinch.
- */
-static void
-vm_pageout_pmap_collect(void)
-{
- int i;
- vm_page_t m;
- static int warningdone;
-
- if (pmap_pagedaemon_waken == 0)
- return;
- if (warningdone < 5) {
- printf("collecting pv entries -- suggest increasing PMAP_SHPGPERPROC\n");
- warningdone++;
- }
- vm_page_lock_queues();
- for (i = 0; i < vm_page_array_size; i++) {
- m = &vm_page_array[i];
- if (m->wire_count || m->hold_count || m->busy ||
- (m->flags & (PG_BUSY | PG_UNMANAGED)))
- continue;
- pmap_remove_all(m);
- }
- vm_page_unlock_queues();
- pmap_pagedaemon_waken = 0;
-}
-
-/*
* vm_pageout_scan does the dirty work for the pageout daemon.
*/
static void
@@ -723,10 +693,6 @@ vm_pageout_scan(int pass)
* We do this explicitly after the caches have been drained above.
*/
uma_reclaim();
- /*
- * Do whatever cleanup that the pmap code can.
- */
- vm_pageout_pmap_collect();
addl_page_shortage_init = atomic_readandclear_int(&vm_pageout_deficit);
OpenPOWER on IntegriCloud