Source-Changes-HG archive

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

[src/trunk]: src/sys/arch remove a check against uvmexp.ncolors that is done ...



details:   https://anonhg.NetBSD.org/src/rev/3b60dbb98bbd
branches:  trunk
changeset: 770153:3b60dbb98bbd
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Oct 06 06:56:29 2011 +0000

description:
remove a check against uvmexp.ncolors that is done inside uvm_page_recolor()
already anyway.

diffstat:

 sys/arch/x86/x86/cpu.c |  10 ++++------
 sys/arch/xen/x86/cpu.c |  10 ++++------
 2 files changed, 8 insertions(+), 12 deletions(-)

diffs (64 lines):

diff -r 17b835b93ec9 -r 3b60dbb98bbd sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Thu Oct 06 06:55:34 2011 +0000
+++ b/sys/arch/x86/x86/cpu.c    Thu Oct 06 06:56:29 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.93 2011/09/28 15:38:21 jruoho Exp $  */
+/*     $NetBSD: cpu.c,v 1.94 2011/10/06 06:56:29 mrg Exp $     */
 
 /*-
  * Copyright (c) 2000, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.93 2011/09/28 15:38:21 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.94 2011/10/06 06:56:29 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"                /* for MPDEBUG */
@@ -265,11 +265,9 @@
        }
 
        /*
-        * Knowing the size of the largest cache on this CPU, re-color
-        * our pages.
+        * Knowing the size of the largest cache on this CPU, potentially
+        * re-color our pages.
         */
-       if (ncolors <= uvmexp.ncolors)
-               return;
        aprint_debug_dev(ci->ci_dev, "%d page colors\n", ncolors);
        uvm_page_recolor(ncolors);
 }
diff -r 17b835b93ec9 -r 3b60dbb98bbd sys/arch/xen/x86/cpu.c
--- a/sys/arch/xen/x86/cpu.c    Thu Oct 06 06:55:34 2011 +0000
+++ b/sys/arch/xen/x86/cpu.c    Thu Oct 06 06:56:29 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.66 2011/09/28 15:38:22 jruoho Exp $  */
+/*     $NetBSD: cpu.c,v 1.67 2011/10/06 06:56:30 mrg Exp $     */
 /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp  */
 
 /*-
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.66 2011/09/28 15:38:22 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.67 2011/10/06 06:56:30 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -376,11 +376,9 @@
        }
 
        /*
-        * Knowing the size of the largest cache on this CPU, re-color
-        * our pages.
+        * Knowing the size of the largest cache on this CPU, potentially
+        * re-color our pages.
         */
-       if (ncolors <= uvmexp.ncolors)
-               return;
        aprint_debug_dev(ci->ci_dev, "%d page colors\n", ncolors);
        uvm_page_recolor(ncolors);
 }



Home | Main Index | Thread Index | Old Index