summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_map.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 15611bf..a63713d 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2209,7 +2209,14 @@ vm_map_madvise(
vm_object_madvise(current->object.vm_object, pstart,
pend, behav);
- if (behav == MADV_WILLNEED) {
+
+ /*
+ * Pre-populate paging structures in the
+ * WILLNEED case. For wired entries, the
+ * paging structures are already populated.
+ */
+ if (behav == MADV_WILLNEED &&
+ current->wired_count == 0) {
vm_map_pmap_enter(map,
useStart,
current->protection,
OpenPOWER on IntegriCloud