Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm The uvmexp.pdpending change was incorrect - revert f...



details:   https://anonhg.NetBSD.org/src/rev/287ef83681ac
branches:  trunk
changeset: 466196:287ef83681ac
user:      ad <ad%NetBSD.org@localhost>
date:      Sat Dec 14 21:36:00 2019 +0000

description:
The uvmexp.pdpending change was incorrect - revert for now.

diffstat:

 sys/uvm/uvm_pager.c   |   5 +++--
 sys/uvm/uvm_pdaemon.c |  12 ++++++------
 2 files changed, 9 insertions(+), 8 deletions(-)

diffs (77 lines):

diff -r 0b6079324bcc -r 287ef83681ac sys/uvm/uvm_pager.c
--- a/sys/uvm/uvm_pager.c       Sat Dec 14 20:46:13 2019 +0000
+++ b/sys/uvm/uvm_pager.c       Sat Dec 14 21:36:00 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pager.c,v 1.115 2019/12/14 15:04:47 ad Exp $       */
+/*     $NetBSD: uvm_pager.c,v 1.116 2019/12/14 21:36:00 ad Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.115 2019/12/14 15:04:47 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.116 2019/12/14 21:36:00 ad Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_readahead.h"
@@ -473,6 +473,7 @@
                        else
                                uvm_swap_free(swslot, npages);
                }
+               atomic_dec_uint(&uvmexp.pdpending);
 #endif /* defined(VMSWAP) */
        }
 }
diff -r 0b6079324bcc -r 287ef83681ac sys/uvm/uvm_pdaemon.c
--- a/sys/uvm/uvm_pdaemon.c     Sat Dec 14 20:46:13 2019 +0000
+++ b/sys/uvm/uvm_pdaemon.c     Sat Dec 14 21:36:00 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pdaemon.c,v 1.114 2019/12/14 15:04:47 ad Exp $     */
+/*     $NetBSD: uvm_pdaemon.c,v 1.115 2019/12/14 21:36:00 ad Exp $     */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.114 2019/12/14 15:04:47 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.115 2019/12/14 21:36:00 ad Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_readahead.h"
@@ -368,7 +368,6 @@
 uvm_pageout_start(int npages)
 {
 
-       atomic_inc_uint(&uvmexp.pdpending);
        atomic_add_int(&uvmexp.paging, npages);
 }
 
@@ -377,7 +376,6 @@
 {
 
        KASSERT(uvmexp.paging >= npages);
-       atomic_dec_uint(&uvmexp.pdpending);
        atomic_add_int(&uvmexp.paging, -npages);
 
        /*
@@ -901,12 +899,14 @@
                }
                mutex_exit(slock);
 
+               swapcluster_flush(&swc, false);
+
                /*
-                * set the pageout in progress.  bump counters and set up
+                * the pageout is in progress.  bump counters and set up
                 * for the next loop.
                 */
 
-               swapcluster_flush(&swc, false);
+               atomic_inc_uint(&uvmexp.pdpending);
 
 #else /* defined(VMSWAP) */
                uvm_pageactivate(p);



Home | Main Index | Thread Index | Old Index