summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2010-09-09 13:32:58 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2010-09-09 13:32:58 +0000
commit6a5624ed415a1c6745c851f3bf2e3beb1d481706 (patch)
tree4dcb1a2fef70ee18f312a7eb4038d7becaee9064 /sys/vm
parent258c3c91359faddd228bdcc316478d993dbd6aa3 (diff)
downloadFreeBSD-src-6a5624ed415a1c6745c851f3bf2e3beb1d481706.zip
FreeBSD-src-6a5624ed415a1c6745c851f3bf2e3beb1d481706.tar.gz
On architectures with non-tree-based page tables like PowerPC, every page
in a range must be checked when calling pmap_remove(). Calling pmap_remove() from vm_pageout_map_deactivate_pages() with the entire range of the map could result in attempting to demap an extraordinary number of pages (> 10^15), so iterate through each map entry and unmap each of them individually. MFC after: 6 weeks
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_pageout.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index f4109c1..3d96d9e 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -701,8 +701,11 @@ vm_pageout_map_deactivate_pages(map, desired)
* table pages.
*/
if (desired == 0 && nothingwired) {
- pmap_remove(vm_map_pmap(map), vm_map_min(map),
- vm_map_max(map));
+ tmpe = map->header.next;
+ while (tmpe != &map->header) {
+ pmap_remove(vm_map_pmap(map), tmpe->start, tmpe->end);
+ tmpe = tmpe->next;
+ }
}
vm_map_unlock(map);
}
OpenPOWER on IntegriCloud