From owner-freebsd-bugs@FreeBSD.ORG Wed Apr 23 12:50:01 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CD422C9 for ; Wed, 23 Apr 2014 12:50:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 486D81214 for ; Wed, 23 Apr 2014 12:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3NCo1YJ091023 for ; Wed, 23 Apr 2014 12:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3NCo13O091010; Wed, 23 Apr 2014 12:50:01 GMT (envelope-from gnats) Date: Wed, 23 Apr 2014 12:50:01 GMT Message-Id: <201404231250.s3NCo13O091010@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/187668: commit references a PR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: dfilter service List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 12:50:01 -0000 The following reply was made to PR kern/187668; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/187668: commit references a PR Date: Wed, 23 Apr 2014 12:46:31 +0000 (UTC) Author: mav Date: Wed Apr 23 12:46:27 2014 New Revision: 264821 URL: http://svnweb.freebsd.org/changeset/base/264821 Log: MFC r264550: Fix VIRTUAL and PROF interval timers for short intervals, broken at r247903. Due to the way those timers are implemented, we can't handle very short intervals. In addition to that mentioned patch caused math overflows for short intervals. To avoid that round those intervals to 1 tick. PR: kern/187668 Modified: stable/10/sys/kern/kern_time.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_time.c ============================================================================== --- stable/10/sys/kern/kern_time.c Wed Apr 23 12:16:36 2014 (r264820) +++ stable/10/sys/kern/kern_time.c Wed Apr 23 12:46:27 2014 (r264821) @@ -774,6 +774,14 @@ kern_setitimer(struct thread *td, u_int timevalsub(&oitv->it_value, &ctv); } } else { + if (aitv->it_interval.tv_sec == 0 && + aitv->it_interval.tv_usec != 0 && + aitv->it_interval.tv_usec < tick) + aitv->it_interval.tv_usec = tick; + if (aitv->it_value.tv_sec == 0 && + aitv->it_value.tv_usec != 0 && + aitv->it_value.tv_usec < tick) + aitv->it_value.tv_usec = tick; PROC_SLOCK(p); *oitv = p->p_stats->p_timer[which]; p->p_stats->p_timer[which] = *aitv; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"