Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpvfs In aiodone, call uvm_pageout_done()...



details:   https://anonhg.NetBSD.org/src/rev/dca713f8e159
branches:  trunk
changeset: 755348:dca713f8e159
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Jun 02 12:07:03 2010 +0000

description:
In aiodone, call uvm_pageout_done() with number of PG_PAGEOUT pages
processed.

diffstat:

 sys/rump/librump/rumpvfs/vm_vfs.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r 775fb8c7b71a -r dca713f8e159 sys/rump/librump/rumpvfs/vm_vfs.c
--- a/sys/rump/librump/rumpvfs/vm_vfs.c Wed Jun 02 10:55:18 2010 +0000
+++ b/sys/rump/librump/rumpvfs/vm_vfs.c Wed Jun 02 12:07:03 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_vfs.c,v 1.15 2009/12/16 16:50:49 pooka Exp $        */
+/*     $NetBSD: vm_vfs.c,v 1.16 2010/06/02 12:07:03 pooka Exp $        */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.15 2009/12/16 16:50:49 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.16 2010/06/02 12:07:03 pooka Exp $");
 
 #include <sys/param.h>
 
@@ -50,15 +50,21 @@
        int i, npages = bp->b_bufsize >> PAGE_SHIFT;
        struct vm_page **pgs;
        vaddr_t va;
+       int pageout = 0;
 
        pgs = kmem_alloc(npages * sizeof(*pgs), KM_SLEEP);
        for (i = 0; i < npages; i++) {
                va = (vaddr_t)bp->b_data + (i << PAGE_SHIFT);
                pgs[i] = uvm_pageratop(va);
-               pgs[i]->flags &= ~PG_PAGEOUT;
+               if (pgs[i]->flags & PG_PAGEOUT) {
+                       KASSERT((pgs[i]->flags & PG_FAKE) == 0);
+                       pageout++;
+                       pgs[i]->flags &= ~PG_PAGEOUT;
+               }
        }
 
        uvm_pagermapout((vaddr_t)bp->b_data, npages);
+       uvm_pageout_done(pageout);
        uvm_page_unbusy(pgs, npages);
 
        if (BUF_ISWRITE(bp) && (bp->b_cflags & BC_AGE) != 0) {



Home | Main Index | Thread Index | Old Index