From owner-svn-src-projects@FreeBSD.ORG Fri Dec 14 16:04:10 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 90E95EE2; Fri, 14 Dec 2012 16:04:10 +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 6A9078FC0C; Fri, 14 Dec 2012 16:04:10 +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 qBEG4AT4093025; Fri, 14 Dec 2012 16:04:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBEG492p093019; Fri, 14 Dec 2012 16:04:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201212141604.qBEG492p093019@svn.freebsd.org> From: Alexander Motin Date: Fri, 14 Dec 2012 16:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r244221 - projects/calloutng/share/man/man9 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: Fri, 14 Dec 2012 16:04:10 -0000 Author: mav Date: Fri Dec 14 16:04:09 2012 New Revision: 244221 URL: http://svnweb.freebsd.org/changeset/base/244221 Log: Document new precision arguments. Modified: projects/calloutng/share/man/man9/condvar.9 projects/calloutng/share/man/man9/sleep.9 projects/calloutng/share/man/man9/sleepqueue.9 projects/calloutng/share/man/man9/timeout.9 Modified: projects/calloutng/share/man/man9/condvar.9 ============================================================================== --- projects/calloutng/share/man/man9/condvar.9 Fri Dec 14 15:37:32 2012 (r244220) +++ projects/calloutng/share/man/man9/condvar.9 Fri Dec 14 16:04:09 2012 (r244221) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 6, 2012 +.Dd December 14, 2012 .Dt CONDVAR 9 .Os .Sh NAME @@ -70,7 +70,8 @@ .Ft int .Fn cv_timedwait_sig "struct cv *cvp" "lock" "int timo" .Ft int -.Fn cv_timedwait_sig_bt "struct cv *cvp" "lock" "struct bintime *bt" "int flags" +.Fn cv_timedwait_sig_bt "struct cv *cvp" "lock" "struct bintime *bt" \ +"struct bintime *pr" .Ft int .Fn cv_timedwait_sig_flags "struct cv *cvp" "lock" "int timo" "int flags" .Ft void @@ -218,10 +219,8 @@ as returned by .Fn binuptime function. The parameter -.Fa flags -allows to specify additional -.Xr callout 9 -flags, such as precision. +.Fa pr +allows to specify wanted absolute event precision. .Sh RETURN VALUES If successful, .Fn cv_wait_sig , Modified: projects/calloutng/share/man/man9/sleep.9 ============================================================================== --- projects/calloutng/share/man/man9/sleep.9 Fri Dec 14 15:37:32 2012 (r244220) +++ projects/calloutng/share/man/man9/sleep.9 Fri Dec 14 16:04:09 2012 (r244221) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 6, 2012 +.Dd December 14, 2012 .Dt SLEEP 9 .Os .Sh NAME @@ -45,7 +45,7 @@ .Fn msleep "void *chan" "struct mtx *mtx" "int priority" "const char *wmesg" "int timo" .Ft int .Fn msleep_bt "void *chan" "struct mtx *mtx" "int priority" \ -"const char *wmesg" "struct bintime *bt" "int flags" +"const char *wmesg" "struct bintime *bt" "struct bintime *pr" .Ft int .Fn msleep_spin "void *chan" "struct mtx *mtx" "const char *wmesg" "int timo" .Ft void @@ -54,7 +54,7 @@ .Fn tsleep "void *chan" "int priority" "const char *wmesg" "int timo" .Ft int .Fn tsleep_bt "void *chan" "int priority" "const char *wmesg" \ -"struct bintime *bt" "int flags" +"struct bintime *bt" "struct bintime *pr" .Ft void .Fn wakeup "void *chan" .Ft void @@ -169,12 +169,9 @@ since boot in form of as returned by .Fn binuptime function. -.Pp The parameter -.Fa flags -allows to specify additional -.Xr callout 9 -flags, such as precision. +.Fa pr +allows to specify wanted absolute event precision. .Pp Several of the sleep functions including .Fn msleep , Modified: projects/calloutng/share/man/man9/sleepqueue.9 ============================================================================== --- projects/calloutng/share/man/man9/sleepqueue.9 Fri Dec 14 15:37:32 2012 (r244220) +++ projects/calloutng/share/man/man9/sleepqueue.9 Fri Dec 14 16:04:09 2012 (r244221) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 6, 2012 +.Dd December 14, 2012 .Dt SLEEPQUEUE 9 .Os .Sh NAME @@ -84,7 +84,8 @@ .Ft void .Fn sleepq_set_timeout_flags "void *wchan" "int timo" "int flags" .Ft void -.Fn sleepq_set_timeout_bt "void *wchan" "struct bintime *bt" "int flags" +.Fn sleepq_set_timeout_bt "void *wchan" "struct bintime *bt" \ +"struct bintime *pr" .Ft u_int .Fn sleepq_sleepcnt "void *wchan" "int queue" .Ft int @@ -249,10 +250,8 @@ as returned by .Fn binuptime function. The parameter -.Fa flags -allows to specify additional -.Xr callout 9 -flags, such as precision. +.Fa pr +allows to specify wanted absolute event precision. .Pp The current thread may be marked interruptible by calling .Fn sleepq_catch_signals Modified: projects/calloutng/share/man/man9/timeout.9 ============================================================================== --- projects/calloutng/share/man/man9/timeout.9 Fri Dec 14 15:37:32 2012 (r244220) +++ projects/calloutng/share/man/man9/timeout.9 Fri Dec 14 16:04:09 2012 (r244221) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 6, 2012 +.Dd December 14, 2012 .Dt TIMEOUT 9 .Os .Sh NAME @@ -88,7 +88,7 @@ struct callout_handle handle = CALLOUT_H "void *arg" "int cpu" "int flags" .Ft int .Fn callout_reset_bt_on "struct callout *c" "struct bintime *bt" \ -"timeout_t *func" "void *arg" "int cpu" "int flags" +"struct bintime *pr" "timeout_t *func" "void *arg" "int cpu" "int flags" .Ft int .Fn callout_reset_curcpu "struct callout *c" "int ticks" "timeout_t *func" \ "void *arg" @@ -349,28 +349,21 @@ Run handler directly from hardware inter It is faster, but puts more constraints on handlers. Handlers may use only spin mutexes for locking, and they must be fast because they run with absolute priority. -.It Fn C_US2PREC -Specifies acceptable deviation between requested and factual run time in -microseconds. -Bigger value allows to aggregate more events in one timer interrupt to +.It Fn C_PRELSET +Specifies relative event time precision as binary logarithm of time interval +divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4, etc. +Smaller value allows to aggregate more events in one timer interrupt to reduce processing overhead and power consumption. -.It Fn C_BT2PREC -Alike to -.Fn C_US2PREC , -but allows to specify deviation as 64bit fraction of second same as -.Fa frac -field in -.Ft struct bintime . .El .Pp The function .Fn callout_reset_bt_on -allows to get higher time resolution taking absolute time since boot +allows to get higher time resolution, taking absolute time since boot in form of struct bintime *, as returned by .Fn binuptime or .Fn getbinuptime -functions, instead of relative ticks count. +functions, and precision, instead of relative ticks count. If specified time is in past, it will be silently converted to present to run handler as soon as possible. .Pp