summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-07-13 19:48:54 +0000
committeralc <alc@FreeBSD.org>2002-07-13 19:48:54 +0000
commitee17f219fb9065816011bc297e15dc930b8adb49 (patch)
tree5c3b8e8494495fed462cb4229621d047f432b4ce /sys
parent02d3f94cc92f810c98e486c42a2111ac35718e58 (diff)
downloadFreeBSD-src-ee17f219fb9065816011bc297e15dc930b8adb49.zip
FreeBSD-src-ee17f219fb9065816011bc297e15dc930b8adb49.tar.gz
o Lock some page queue accesses, in particular, those by vm_page_unwire().
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/pmap.c4
-rw-r--r--sys/i386/i386/pmap.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 1a85a52..037de9f 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1002,9 +1002,11 @@ pmap_dispose_thread(td)
m = vm_page_lookup(ksobj, i);
if (m == NULL)
panic("pmap_dispose_thread: kstack already missing?");
+ vm_page_lock_queues();
vm_page_busy(m);
vm_page_unwire(m, 0);
vm_page_free(m);
+ vm_page_unlock_queues();
}
/*
* Free the space that this stack was mapped to in the kernel
@@ -1037,8 +1039,10 @@ pmap_swapout_thread(td)
m = vm_page_lookup(ksobj, i);
if (m == NULL)
panic("pmap_swapout_thread: kstack already missing?");
+ vm_page_lock_queues();
vm_page_dirty(m);
vm_page_unwire(m, 0);
+ vm_page_unlock_queues();
}
}
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 1a85a52..037de9f 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -1002,9 +1002,11 @@ pmap_dispose_thread(td)
m = vm_page_lookup(ksobj, i);
if (m == NULL)
panic("pmap_dispose_thread: kstack already missing?");
+ vm_page_lock_queues();
vm_page_busy(m);
vm_page_unwire(m, 0);
vm_page_free(m);
+ vm_page_unlock_queues();
}
/*
* Free the space that this stack was mapped to in the kernel
@@ -1037,8 +1039,10 @@ pmap_swapout_thread(td)
m = vm_page_lookup(ksobj, i);
if (m == NULL)
panic("pmap_swapout_thread: kstack already missing?");
+ vm_page_lock_queues();
vm_page_dirty(m);
vm_page_unwire(m, 0);
+ vm_page_unlock_queues();
}
}
OpenPOWER on IntegriCloud