uao_pagein_page() & anon_pagein():

* return failure if the page cannot be retrieved.
	* wakeup any waiters when releasing a page after successful page in.
This commit is contained in:
pk 2003-08-11 16:54:10 +00:00
parent 96f1796f30
commit d022b5caad
2 changed files with 19 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_anon.c,v 1.24 2003/08/11 16:48:05 pk Exp $ */
/* $NetBSD: uvm_anon.c,v 1.25 2003/08/11 16:54:10 pk Exp $ */
/*
*
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.24 2003/08/11 16:48:05 pk Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.25 2003/08/11 16:54:10 pk Exp $");
#include "opt_uvmhist.h"
@ -501,6 +501,9 @@ anon_pagein(anon)
*/
return FALSE;
default:
return TRUE;
}
/*
@ -525,6 +528,11 @@ anon_pagein(anon)
uvm_pagedeactivate(pg);
uvm_unlock_pageq();
if (pg->flags & PG_WANTED) {
wakeup(pg);
pg->flags &= ~(PG_WANTED);
}
/*
* unlock the anon and we're done.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_aobj.c,v 1.58 2003/08/11 16:48:05 pk Exp $ */
/* $NetBSD: uvm_aobj.c,v 1.59 2003/08/11 16:54:11 pk Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.58 2003/08/11 16:48:05 pk Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.59 2003/08/11 16:54:11 pk Exp $");
#include "opt_uvmhist.h"
@ -1452,6 +1452,9 @@ uao_pagein_page(aobj, pageidx)
*/
return FALSE;
default:
return TRUE;
}
/*
@ -1468,7 +1471,10 @@ uao_pagein_page(aobj, pageidx)
uvm_pagedeactivate(pg);
uvm_unlock_pageq();
pg->flags &= ~(PG_BUSY|PG_CLEAN|PG_FAKE);
if (pg->flags & PG_WANTED) {
wakeup(pg);
}
pg->flags &= ~(PG_WANTED|PG_BUSY|PG_CLEAN|PG_FAKE);
UVM_PAGE_OWN(pg, NULL);
return FALSE;