Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm when dropping a kernel loan, if this was the last lo...



details:   https://anonhg.NetBSD.org/src/rev/7c6d34032cbb
branches:  trunk
changeset: 534070:7c6d34032cbb
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Jul 14 23:53:41 2002 +0000

description:
when dropping a kernel loan, if this was the last loan-to-kernel but
the page is still loaned to an anon, we should put the page back on a
paging queue.  this is because while pages loaned to the kernel really
do need to stay resident (since the kernel is accessing the physical
memory directly), pages loaned to anons can be paged out just fine.
(the page will be paged out twice, first to the object and then again
to the anon, but after that the page can be reused.)

diffstat:

 sys/uvm/uvm_loan.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r cc43710a43de -r 7c6d34032cbb sys/uvm/uvm_loan.c
--- a/sys/uvm/uvm_loan.c        Sun Jul 14 21:09:17 2002 +0000
+++ b/sys/uvm/uvm_loan.c        Sun Jul 14 23:53:41 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_loan.c,v 1.38 2002/05/29 11:04:39 enami Exp $      */
+/*     $NetBSD: uvm_loan.c,v 1.39 2002/07/14 23:53:41 chs Exp $        */
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.38 2002/05/29 11:04:39 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.39 2002/07/14 23:53:41 chs Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -803,6 +803,9 @@
                        } else {
                                uvm_pageactivate(pg);
                        }
+               } else if (pg->loan_count == 1 && pg->uobject != NULL &&
+                          pg->uanon != NULL) {
+                       uvm_pageactivate(pg);
                }
                if (slock != NULL) {
                        simple_unlock(slock);



Home | Main Index | Thread Index | Old Index