From owner-svn-src-projects@FreeBSD.ORG Sat Dec 15 10:48:11 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3746A154; Sat, 15 Dec 2012 10:48:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C6DA8FC12; Sat, 15 Dec 2012 10:48:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBFAmAsa040484; Sat, 15 Dec 2012 10:48:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBFAmAvK040483; Sat, 15 Dec 2012 10:48:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201212151048.qBFAmAvK040483@svn.freebsd.org> From: Alexander Motin Date: Sat, 15 Dec 2012 10:48:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r244251 - projects/calloutng/sys/kern X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2012 10:48:11 -0000 Author: mav Date: Sat Dec 15 10:48:10 2012 New Revision: 244251 URL: http://svnweb.freebsd.org/changeset/base/244251 Log: Specify that precision of 0.5s is enough for resource limitation. Modified: projects/calloutng/sys/kern/kern_resource.c Modified: projects/calloutng/sys/kern/kern_resource.c ============================================================================== --- projects/calloutng/sys/kern/kern_resource.c Sat Dec 15 10:46:57 2012 (r244250) +++ projects/calloutng/sys/kern/kern_resource.c Sat Dec 15 10:48:10 2012 (r244251) @@ -645,7 +645,7 @@ lim_cb(void *arg) } } if ((p->p_flag & P_WEXIT) == 0) - callout_reset(&p->p_limco, hz, lim_cb, p); + callout_reset_flags(&p->p_limco, hz, lim_cb, p, C_PRELSET(1)); } int @@ -697,7 +697,8 @@ kern_proc_setrlimit(struct thread *td, s case RLIMIT_CPU: if (limp->rlim_cur != RLIM_INFINITY && p->p_cpulimit == RLIM_INFINITY) - callout_reset(&p->p_limco, hz, lim_cb, p); + callout_reset_flags(&p->p_limco, hz, lim_cb, p, + C_PRELSET(1)); p->p_cpulimit = limp->rlim_cur; break; case RLIMIT_DATA: @@ -1137,7 +1138,7 @@ lim_fork(struct proc *p1, struct proc *p p2->p_limit = lim_hold(p1->p_limit); callout_init_mtx(&p2->p_limco, &p2->p_mtx, 0); if (p1->p_cpulimit != RLIM_INFINITY) - callout_reset(&p2->p_limco, hz, lim_cb, p2); + callout_reset_flags(&p2->p_limco, hz, lim_cb, p2, C_PRELSET(1)); } void