Module Name: src Committed By: mrg Date: Thu Oct 6 06:56:30 UTC 2011
Modified Files: src/sys/arch/x86/x86: cpu.c src/sys/arch/xen/x86: cpu.c Log Message: remove a check against uvmexp.ncolors that is done inside uvm_page_recolor() already anyway. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.66 -r1.67 src/sys/arch/xen/x86/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/cpu.c diff -u src/sys/arch/x86/x86/cpu.c:1.93 src/sys/arch/x86/x86/cpu.c:1.94 --- src/sys/arch/x86/x86/cpu.c:1.93 Wed Sep 28 15:38:21 2011 +++ src/sys/arch/x86/x86/cpu.c Thu Oct 6 06:56:29 2011 @@ -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 @@ cpu_vm_init(struct cpu_info *ci) } /* - * 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); } Index: src/sys/arch/xen/x86/cpu.c diff -u src/sys/arch/xen/x86/cpu.c:1.66 src/sys/arch/xen/x86/cpu.c:1.67 --- src/sys/arch/xen/x86/cpu.c:1.66 Wed Sep 28 15:38:22 2011 +++ src/sys/arch/xen/x86/cpu.c Thu Oct 6 06:56:30 2011 @@ -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 @@ cpu_vm_init(struct cpu_info *ci) } /* - * 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); }