diff options
author | alc <alc@FreeBSD.org> | 2002-11-13 05:39:58 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-11-13 05:39:58 +0000 |
commit | c02d224c79a209121012072dc916c2d61ce8c1e5 (patch) | |
tree | e422808e35d14010cfbd0e3bec778fcc4bba8771 /sys/i386 | |
parent | 51b18a9ea395df565a980577302fe8bc0f24ab8c (diff) | |
download | FreeBSD-src-c02d224c79a209121012072dc916c2d61ce8c1e5.zip FreeBSD-src-c02d224c79a209121012072dc916c2d61ce8c1e5.tar.gz |
Move pmap_collect() out of the machine-dependent code, rename it
to reflect its new location, and add page queue and flag locking.
Notes: (1) alpha, i386, and ia64 had identical implementations
of pmap_collect() in terms of machine-independent interfaces;
(2) sparc64 doesn't require it; (3) powerpc had it as a TODO.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/pmap.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index e783b28..b0e43ba 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -173,7 +173,7 @@ extern u_int32_t KERNend; static uma_zone_t pvzone; static struct vm_object pvzone_obj; static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; -static int pmap_pagedaemon_waken = 0; +int pmap_pagedaemon_waken; /* * All those kernel PT submaps that BSD is so fond of @@ -1619,36 +1619,6 @@ get_pv_entry(void) } /* - * This routine is very drastic, but can save the system - * in a pinch. - */ -void -pmap_collect() -{ - int i; - vm_page_t m; - static int warningdone = 0; - - if (pmap_pagedaemon_waken == 0) - return; - - if (warningdone < 5) { - printf("pmap_collect: collecting pv entries -- suggest increasing PMAP_SHPGPERPROC\n"); - warningdone++; - } - - 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); - } - pmap_pagedaemon_waken = 0; -} - - -/* * If it is the first entry on the list, it is actually * in the header and we must copy the following entry up * to the header. Otherwise we must search the list for |