From owner-svn-src-head@FreeBSD.ORG Sun Oct 31 11:44:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28FC7106566B; Sun, 31 Oct 2010 11:44:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 183E58FC1A; Sun, 31 Oct 2010 11:44:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9VBifR3085972; Sun, 31 Oct 2010 11:44:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9VBifsO085970; Sun, 31 Oct 2010 11:44:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201010311144.o9VBifsO085970@svn.freebsd.org> From: Alexander Motin Date: Sun, 31 Oct 2010 11:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214597 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Oct 2010 11:44:42 -0000 Author: mav Date: Sun Oct 31 11:44:41 2010 New Revision: 214597 URL: http://svn.freebsd.org/changeset/base/214597 Log: Fix callout_tickstofirst() behavior after signed integer ticks overflow. This should fix callout precision drop to 1/4s after 25 days of uptime with HZ = 1000. Submitted by: Taku YAMAMOTO Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Sun Oct 31 09:21:27 2010 (r214596) +++ head/sys/kern/kern_timeout.c Sun Oct 31 11:44:41 2010 (r214597) @@ -295,8 +295,7 @@ callout_tickstofirst(int limit) sc = &cc->cc_callwheel[ (curticks+skip) & callwheelmask ]; /* search scanning ticks */ TAILQ_FOREACH( c, sc, c_links.tqe ){ - if (c && (c->c_time <= curticks + ncallout) - && (c->c_time > 0)) + if (c->c_time - curticks <= ncallout) goto out; } skip++;