Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src/sys/uvm Pull up revision 1.63 (requested by yamt in tic...



details:   https://anonhg.NetBSD.org/src/rev/b725ef9c0f0b
branches:  netbsd-2-0
changeset: 560801:b725ef9c0f0b
user:      tron <tron%NetBSD.org@localhost>
date:      Mon May 10 14:26:44 2004 +0000

description:
Pull up revision 1.63 (requested by yamt in ticket #271):
fix a amap_wirerange deadlock problem by re-introducing
PG_RELEASED for anon pages.  PR/23171 from Christian Limpach.
for details, see discussion filed in the PR database.
uvm_anon_release: a new function to free anon-owned PG_RELEASED page.
uvm_anfree: we can't wait for the page here because the caller might hold
        amap lock.  instead, just mark the page as PG_RELEASED.
        who unbusy the page should check the PG_RELEASED.
uvm_aio_aiodone: uvm_anon_release() instead of uvm_page_unbusy()
        if appropriate.
uvmfault_anonget: check PG_RELEASED.

diffstat:

 sys/uvm/uvm_pager.c |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r d19517fdc081 -r b725ef9c0f0b sys/uvm/uvm_pager.c
--- a/sys/uvm/uvm_pager.c       Mon May 10 14:26:37 2004 +0000
+++ b/sys/uvm/uvm_pager.c       Mon May 10 14:26:44 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pager.c,v 1.62 2003/09/01 14:20:57 pk Exp $        */
+/*     $NetBSD: uvm_pager.c,v 1.62.2.1 2004/05/10 14:26:44 tron Exp $  */
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.62 2003/09/01 14:20:57 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.62.2.1 2004/05/10 14:26:44 tron Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -422,9 +422,15 @@
                 */
 
                if (swap) {
-                       uvm_page_unbusy(&pg, 1);
-                       uvm_unlock_pageq();
-                       simple_unlock(slock);
+                       if (pg->uobject == NULL && pg->uanon->an_ref == 0 &&
+                           (pg->flags & PG_RELEASED) != 0) {
+                               uvm_unlock_pageq();
+                               uvm_anon_release(pg->uanon);
+                       } else {
+                               uvm_page_unbusy(&pg, 1);
+                               uvm_unlock_pageq();
+                               simple_unlock(slock);
+                       }
                }
        }
        if (!swap) {



Home | Main Index | Thread Index | Old Index