From: Matthew Dillon Date: Tue, 18 Sep 2012 21:18:24 +0000 (-0700) Subject: kernel - Increase machdep.cpu_idle_repeat from 4 to 750 X-Git-Tag: v3.2.0~113 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/582fd846b1d9c1fb2b0757c930ab441fbe4d7ff4 kernel - Increase machdep.cpu_idle_repeat from 4 to 750 * Increase machdep.cpu_idle_repeat from 4 to 750. It now takes longer before the kernel will move from HLT/MONITOR/MWAIT to ACPI-based halting. * Improves benchmark performance significantly on recent cpus without eating up too much extra power, but laptop tests are still pending. * Laptop users can always set it back to 4. --- diff --git a/sys/platform/pc32/i386/machdep.c b/sys/platform/pc32/i386/machdep.c index c513e6c563..5f7e68a738 100644 --- a/sys/platform/pc32/i386/machdep.c +++ b/sys/platform/pc32/i386/machdep.c @@ -896,7 +896,7 @@ cpu_halt(void) static int cpu_idle_hlt = 2; static int cpu_idle_hltcnt; static int cpu_idle_spincnt; -static u_int cpu_idle_repeat = 4; +static u_int cpu_idle_repeat = 750; SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, &cpu_idle_hlt, 0, "Idle loop HLT enable"); SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hltcnt, CTLFLAG_RW, diff --git a/sys/platform/pc64/x86_64/machdep.c b/sys/platform/pc64/x86_64/machdep.c index 2da248cae1..4fa35d8e67 100644 --- a/sys/platform/pc64/x86_64/machdep.c +++ b/sys/platform/pc64/x86_64/machdep.c @@ -953,7 +953,7 @@ cpu_halt(void) static int cpu_idle_hlt = 2; static int cpu_idle_hltcnt; static int cpu_idle_spincnt; -static u_int cpu_idle_repeat = 4; +static u_int cpu_idle_repeat = 750; SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, &cpu_idle_hlt, 0, "Idle loop HLT enable"); SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hltcnt, CTLFLAG_RW,