Source-Changes-HG archive

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

[src/chs-ubc2]: src/sys/uvm have the aiodone daemon wakeup the pagedaemon if ...



details:   https://anonhg.NetBSD.org/src/rev/e53608dca7ea
branches:  chs-ubc2
changeset: 471412:e53608dca7ea
user:      chs <chs%NetBSD.org@localhost>
date:      Sat Jul 31 19:02:29 1999 +0000

description:
have the aiodone daemon wakeup the pagedaemon if there are still not
enough free pages after processing everything.

diffstat:

 sys/uvm/uvm_pdaemon.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 8c92191e2d5b -r e53608dca7ea sys/uvm/uvm_pdaemon.c
--- a/sys/uvm/uvm_pdaemon.c     Sat Jul 31 19:01:33 1999 +0000
+++ b/sys/uvm/uvm_pdaemon.c     Sat Jul 31 19:02:29 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pdaemon.c,v 1.15.4.3 1999/07/04 02:04:29 chs Exp $ */
+/*     $NetBSD: uvm_pdaemon.c,v 1.15.4.4 1999/07/31 19:02:29 chs Exp $ */
 
 /* 
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -276,7 +276,7 @@
 void
 uvm_aiodone_daemon()
 {
-       int s;
+       int s, free;
        struct buf *bp, *nbp;
        UVMHIST_FUNC("uvm_aiodoned"); UVMHIST_CALLED(pdhist);
 
@@ -323,6 +323,7 @@
                 * process each i/o that's done.
                 */
 
+               free = uvmexp.free;
                for (/*null*/; bp != NULL ; bp = nbp) {
                        if (bp->b_flags & B_PDAEMON) {
                                uvmexp.paging -= bp->b_bufsize >> PAGE_SHIFT;
@@ -330,6 +331,11 @@
                        nbp = TAILQ_NEXT(bp, b_freelist);
                        (*bp->b_iodone)(bp);
                }
+               if (free <= uvmexp.reserve_kernel) {
+                       s = uvm_lock_fpageq();
+                       wakeup(&uvm.pagedaemon);
+                       uvm_unlock_fpageq(s);
+               }
        }
 }
 



Home | Main Index | Thread Index | Old Index