Date: Fri, 23 Mar 2012 16:12:52 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r233367 - stable/9/sys/kern Message-ID: <201203231612.q2NGCqat083516@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Fri Mar 23 16:12:52 2012 New Revision: 233367 URL: http://svn.freebsd.org/changeset/base/233367 Log: MFC r232717: Be more polite when setting state->nextevent inside cpu_new_callout(). Hardclock is not the only who wakes idle CPU since kdtrace cyclic addition. Modified: stable/9/sys/kern/kern_clocksource.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_clocksource.c ============================================================================== --- stable/9/sys/kern/kern_clocksource.c Fri Mar 23 15:49:46 2012 (r233366) +++ stable/9/sys/kern/kern_clocksource.c Fri Mar 23 16:12:52 2012 (r233367) @@ -860,10 +860,11 @@ cpu_new_callout(int cpu, int ticks) * If timer is global - there is chance it is already programmed. */ if (periodic || (timer->et_flags & ET_FLAGS_PERCPU) == 0) { - state->nextevent = state->nexthard; tmp = hardperiod; bintime_mul(&tmp, ticks - 1); - bintime_add(&state->nextevent, &tmp); + bintime_add(&tmp, &state->nexthard); + if (bintime_cmp(&tmp, &state->nextevent, <)) + state->nextevent = tmp; if (periodic || bintime_cmp(&state->nextevent, &nexttick, >=)) { ET_HW_UNLOCK(state);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203231612.q2NGCqat083516>