diff options
Diffstat (limited to 'sys/uvm/uvm_fault.c')
-rw-r--r-- | sys/uvm/uvm_fault.c | 57 |
1 files changed, 14 insertions, 43 deletions
diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c index a10fd054e84..e5eb6b8e3b0 100644 --- a/sys/uvm/uvm_fault.c +++ b/sys/uvm/uvm_fault.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_fault.c,v 1.57 2009/06/16 23:54:58 oga Exp $ */ +/* $OpenBSD: uvm_fault.c,v 1.58 2009/07/22 21:05:37 oga Exp $ */ /* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */ /* @@ -921,10 +921,10 @@ ReFault: /* * if center page is resident and not - * PG_BUSY|PG_RELEASED then pgo_get - * made it PG_BUSY for us and gave - * us a handle to it. remember this - * page as "uobjpage." (for later use). + * PG_BUSY, then pgo_get made it PG_BUSY + * for us and gave us a handle to it. + * remember this page as "uobjpage." + * (for later use). */ if (lcv == centeridx) { @@ -966,8 +966,8 @@ ReFault: (wired ? PMAP_WIRED : 0)); /* - * NOTE: page can't be PG_WANTED or PG_RELEASED - * because we've held the lock the whole time + * NOTE: page can't be PG_WANTED because + * we've held the lock the whole time * we've had the handle. */ @@ -1371,15 +1371,12 @@ Case2: /* locked(!locked): uobj, uobjpage */ /* - * verify that the page has not be released and re-verify - * that amap slot is still free. if there is a problem, - * we unlock and clean up. + * Re-verify that amap slot is still free. if there is + * a problem, we unlock and clean up. */ - if ((uobjpage->pg_flags & PG_RELEASED) != 0 || - (locked && amap && - amap_lookup(&ufi.entry->aref, - ufi.orig_rvaddr - ufi.entry->start))) { + if (locked && amap && amap_lookup(&ufi.entry->aref, + ufi.orig_rvaddr - ufi.entry->start)) { if (locked) uvmfault_unlockall(&ufi, amap, NULL, NULL); locked = FALSE; @@ -1398,17 +1395,6 @@ Case2: /* still holding object lock */ wakeup(uobjpage); - if (uobjpage->pg_flags & PG_RELEASED) { - uvmexp.fltpgrele++; - KASSERT(uobj->pgops->pgo_releasepg != NULL); - - /* frees page */ - if (uobj->pgops->pgo_releasepg(uobjpage,NULL)) - /* unlock if still alive */ - simple_unlock(&uobj->vmobjlock); - goto ReFault; - } - uvm_lock_pageq(); /* make sure it is in queues */ uvm_pageactivate(uobjpage); @@ -1423,9 +1409,8 @@ Case2: } /* - * we have the data in uobjpage which is PG_BUSY and - * !PG_RELEASED. we are holding object lock (so the page - * can't be released on us). + * we have the data in uobjpage which is PG_BUSY and we are + * holding object lock. */ /* locked: maps(read), amap(if !null), uobj, uobjpage */ @@ -1439,8 +1424,6 @@ Case2: /* * notes: * - at this point uobjpage can not be NULL - * - at this point uobjpage can not be PG_RELEASED (since we checked - * for it above) * - at this point uobjpage could be PG_WANTED (handle later) */ @@ -1627,9 +1610,7 @@ Case2: } /* - * dispose of uobjpage. it can't be PG_RELEASED - * since we still hold the object lock. - * drop handle to uobj as well. + * dispose of uobjpage. drop handle to uobj as well. */ if (uobjpage->pg_flags & PG_WANTED) @@ -1692,11 +1673,6 @@ Case2: if (pg->pg_flags & PG_WANTED) wakeup(pg); /* lock still held */ - /* - * note that pg can't be PG_RELEASED since we did not drop - * the object lock since the last time we checked. - */ - atomic_clearbits_int(&pg->pg_flags, PG_BUSY|PG_FAKE|PG_WANTED); UVM_PAGE_OWN(pg, NULL); uvmfault_unlockall(&ufi, amap, uobj, NULL); @@ -1736,11 +1712,6 @@ Case2: if (pg->pg_flags & PG_WANTED) wakeup(pg); /* lock still held */ - /* - * note that pg can't be PG_RELEASED since we did not drop the object - * lock since the last time we checked. - */ - atomic_clearbits_int(&pg->pg_flags, PG_BUSY|PG_FAKE|PG_WANTED); UVM_PAGE_OWN(pg, NULL); uvmfault_unlockall(&ufi, amap, uobj, NULL); |