Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Fix uvm_page_physget_freelist so that it actually pe...



details:   https://anonhg.NetBSD.org/src/rev/77aae69d607f
branches:  trunk
changeset: 349784:77aae69d607f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Dec 23 09:36:55 2016 +0000

description:
Fix uvm_page_physget_freelist so that it actually performs the two passes
it mentions.

diffstat:

 sys/uvm/uvm_page.c |  15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diffs (55 lines):

diff -r 8ab4d1c0a8a3 -r 77aae69d607f sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c        Fri Dec 23 09:24:57 2016 +0000
+++ b/sys/uvm/uvm_page.c        Fri Dec 23 09:36:55 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_page.c,v 1.190 2016/12/23 07:15:28 cherry Exp $    */
+/*     $NetBSD: uvm_page.c,v 1.191 2016/12/23 09:36:55 skrll Exp $     */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.190 2016/12/23 07:15:28 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.191 2016/12/23 09:36:55 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvm.h"
@@ -619,9 +619,9 @@
 
        /* pass 1: try allocating from a matching end */
 #if (VM_PHYSSEG_STRAT == VM_PSTRAT_BIGFIRST)
-       for (lcv = uvm_physseg_get_last() ; uvm_physseg_valid_p(lcv) ; lcv = uvm_physseg_get_prev(lcv))
+       for (lcv = uvm_physseg_get_last(); uvm_physseg_valid_p(lcv); lcv = uvm_physseg_get_prev(lcv))
 #else
-               for (lcv = uvm_physseg_get_first() ; uvm_physseg_valid_p(lcv) ; lcv = uvm_physseg_get_next(lcv))
+       for (lcv = uvm_physseg_get_first(); uvm_physseg_valid_p(lcv); lcv = uvm_physseg_get_next(lcv))
 #endif
        {
                if (uvm.page_init_done == true)
@@ -633,13 +633,13 @@
                                continue;
                } else
                        return true;
-
+       }
 
        /* pass2: forget about matching ends, just allocate something */
 #if (VM_PHYSSEG_STRAT == VM_PSTRAT_BIGFIRST)
-               for (lcv = uvm_physseg_get_last() ; uvm_physseg_valid_p(lcv); lcv = uvm_physseg_get_prev(lcv))
+       for (lcv = uvm_physseg_get_last(); uvm_physseg_valid_p(lcv); lcv = uvm_physseg_get_prev(lcv))
 #else
-               for (lcv = uvm_physseg_get_first() ; uvm_physseg_valid_p(lcv) ; lcv = uvm_physseg_get_next(lcv))
+       for (lcv = uvm_physseg_get_first(); uvm_physseg_valid_p(lcv); lcv = uvm_physseg_get_next(lcv))
 #endif
        {
                /* Try the front regardless. */
@@ -649,7 +649,6 @@
                } else
                        return true;
        }
-       }
        return false;
 }
 



Home | Main Index | Thread Index | Old Index