Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151121132
D14625.id40164.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14625.id40164.diff
View Options
Index: sys/vm/vm_fault.c
===================================================================
--- sys/vm/vm_fault.c
+++ sys/vm/vm_fault.c
@@ -662,6 +662,12 @@
*/
fs.m = vm_page_lookup(fs.object, fs.pindex);
if (fs.m != NULL) {
+ /*
+ * Reference the page so that the page daemon doesn't
+ * reclaim it too quickly.
+ */
+ vm_page_aflag_set(fs.m, PGA_REFERENCED);
+
/*
* Wait/Retry if the page is busy. We have to do this
* if the page is either exclusive or shared busy
@@ -679,12 +685,6 @@
* to pmap it.
*/
if (vm_page_busied(fs.m)) {
- /*
- * Reference the page before unlocking and
- * sleeping so that the page daemon is less
- * likely to reclaim it.
- */
- vm_page_aflag_set(fs.m, PGA_REFERENCED);
if (fs.object != fs.first_object) {
if (!VM_OBJECT_TRYWLOCK(
fs.first_object)) {
@@ -710,9 +710,6 @@
vm_object_deallocate(fs.first_object);
goto RetryFault;
}
- vm_page_lock(fs.m);
- vm_page_remque(fs.m);
- vm_page_unlock(fs.m);
/*
* Mark page busy for other processes, and the
@@ -723,7 +720,7 @@
vm_page_xbusy(fs.m);
if (fs.m->valid != VM_PAGE_BITS_ALL)
goto readrest;
- break;
+ break; /* break to PAGE HAS BEEN FOUND */
}
KASSERT(fs.m == NULL, ("fs.m should be NULL, not %p", fs.m));
@@ -1105,6 +1102,7 @@
*/
fs.object == fs.first_object->backing_object) {
vm_page_lock(fs.m);
+ vm_page_remque(fs.m);
vm_page_remove(fs.m);
vm_page_unlock(fs.m);
vm_page_lock(fs.first_m);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 5:38 AM (18 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31013527
Default Alt Text
D14625.id40164.diff (1 KB)
Attached To
Mode
D14625: Avoid dequeuing the page found by a soft fault.
Attached
Detach File
Event Timeline
Log In to Comment