Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161068778
D4478.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
D4478.diff
View Options
Index: head/sys/vm/vm_fault.c
===================================================================
--- head/sys/vm/vm_fault.c
+++ head/sys/vm/vm_fault.c
@@ -799,26 +799,15 @@
* We don't chase down the shadow chain
*/
fs.object == fs.first_object->backing_object) {
- /*
- * get rid of the unnecessary page
- */
- vm_page_lock(fs.first_m);
- vm_page_remove(fs.first_m);
- vm_page_unlock(fs.first_m);
- /*
- * grab the page and put it into the
- * process'es object. The page is
- * automatically made dirty.
- */
- if (vm_page_rename(fs.m, fs.first_object,
- fs.first_pindex)) {
- VM_OBJECT_WUNLOCK(fs.first_object);
- unlock_and_deallocate(&fs);
- goto RetryFault;
- }
+ vm_page_lock(fs.m);
+ vm_page_remove(fs.m);
+ vm_page_unlock(fs.m);
vm_page_lock(fs.first_m);
+ vm_page_replace_checked(fs.m, fs.first_object,
+ fs.first_pindex, fs.first_m);
vm_page_free(fs.first_m);
vm_page_unlock(fs.first_m);
+ vm_page_dirty(fs.m);
#if VM_NRESERVLEVEL > 0
/*
* Rename the reservation.
@@ -827,6 +816,10 @@
fs.object, OFF_TO_IDX(
fs.first_object->backing_object_offset));
#endif
+ /*
+ * Removing the page from the backing object
+ * unbusied it.
+ */
vm_page_xbusy(fs.m);
fs.first_m = fs.m;
fs.m = NULL;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 1, 7:32 AM (10 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34548198
Default Alt Text
D4478.diff (1 KB)
Attached To
Mode
D4478: vm_fault_hold: use vm_page_replace instead of vm_page_rename
Attached
Detach File
Event Timeline
Log In to Comment