Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/uebayasi-xip]: src/sys/uvm uvm_fault_lower_promote: One more missing par...
details: https://anonhg.NetBSD.org/src/rev/8f8649abf1c4
branches: uebayasi-xip
changeset: 751590:8f8649abf1c4
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Tue Feb 23 07:11:46 2010 +0000
description:
uvm_fault_lower_promote: One more missing part for device pages to by-pass
page cache handling. When a page in a uobj is promoted, its content is copied
to another owned by the newly allocated anon. The old page cache is then
disposed. Of course we don't need to dispose device pages in such a case,
so skip it.
Don't forget opt_device_page.h.
Count lower fault correctly.
diffstat:
sys/uvm/uvm_fault.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (53 lines):
diff -r 58ea3a90e4fd -r 8f8649abf1c4 sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c Tue Feb 23 07:05:05 2010 +0000
+++ b/sys/uvm/uvm_fault.c Tue Feb 23 07:11:46 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.c,v 1.166.2.3 2010/02/12 16:09:56 uebayasi Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.166.2.4 2010/02/23 07:11:46 uebayasi Exp $ */
/*
*
@@ -39,9 +39,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.166.2.3 2010/02/12 16:09:56 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.166.2.4 2010/02/23 07:11:46 uebayasi Exp $");
#include "opt_uvmhist.h"
+#include "opt_device_page.h"
#include "opt_xip.h"
#include <sys/param.h>
@@ -1916,11 +1917,11 @@
* set "pg" to the page we want to map in (uobjpage, usually)
*/
pg = uobjpage; /* map in the actual object */
+ uvmexp.flt_obj++;
if (uvm_pageisdevice_p(uobjpage))
goto uvm_fault_lower_direct_done;
- uvmexp.flt_obj++;
if (UVM_ET_ISCOPYONWRITE(ufi->entry) ||
UVM_OBJ_NEEDS_WRITEFAULT(uobjpage->uobject))
flt->enter_prot &= ~VM_PROT_WRITE;
@@ -2035,6 +2036,9 @@
*/
}
+ if (uvm_pageisdevice_p(uobjpage))
+ goto uvm_fault_lower_promote_done;
+
/*
* dispose of uobjpage. it can't be PG_RELEASED
* since we still hold the object lock.
@@ -2046,6 +2050,8 @@
wakeup(uobjpage);
uobjpage->flags &= ~(PG_BUSY|PG_WANTED);
UVM_PAGE_OWN(uobjpage, NULL);
+
+uvm_fault_lower_promote_done:
mutex_exit(&uobj->vmobjlock);
uobj = NULL;
Home |
Main Index |
Thread Index |
Old Index