From owner-svn-src-projects@FreeBSD.ORG Sun Mar 17 19:24:29 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 53D59CBF; Sun, 17 Mar 2013 19:24:29 +0000 (UTC) (envelope-from eadler@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 240AEE9D; Sun, 17 Mar 2013 19:24:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2HJOTKX020358; Sun, 17 Mar 2013 19:24:29 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2HJOTXj020357; Sun, 17 Mar 2013 19:24:29 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201303171924.r2HJOTXj020357@svn.freebsd.org> From: Eitan Adler Date: Sun, 17 Mar 2013 19:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r248439 - projects/counters/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: Sun, 17 Mar 2013 19:24:29 -0000 Author: eadler Date: Sun Mar 17 19:24:28 2013 New Revision: 248439 URL: http://svnweb.freebsd.org/changeset/base/248439 Log: English language changes Approved by: glebius (implicit) Modified: projects/counters/share/man/man9/counter.9 Modified: projects/counters/share/man/man9/counter.9 ============================================================================== --- projects/counters/share/man/man9/counter.9 Sun Mar 17 19:12:01 2013 (r248438) +++ projects/counters/share/man/man9/counter.9 Sun Mar 17 19:24:28 2013 (r248439) @@ -49,38 +49,39 @@ .Fn SYSCTL_COUNTER_U64 parent nbr name access ptr val descr .Fn SYSCTL_ADD_COUNTER_U64 ctx parent nbr name access ptr descr .Sh DESCRIPTION -The .Nm -is a generic facility, which allows to create counters, -that can be utilized to collect statistical data or for other purposes. +is a generic facility to create counters +that can be utilized for purpose (such as collecting statistical +data). A .Nm is guaranteed to be lossless when several kernel threads do simultaneous -update. +updates. However, .Nm does not imply any .Xr locking 9 , -neither any +or .Xr atomic 9 -operations, thus are expected to be fast. +operations and are therefore expected to be fast. Moreover, .Nm -has special optimisations for SMP environment making +has special optimisations for SMP environments making .Nm -update faster than simple "+=" or "++" operation. +update faster than simple addition operations. .Bl -tag -width indent .It Fn counter_u64_alloc how Allocate a new 64-bit unsigned counter. The .Fa wait -argument is +argument is the .Xr malloc 9 wait flag, should be either .Va M_NOWAIT or .Va M_WAITOK . -With no-wait semantics operation may fail. +If +.Va M_WAITOK is specified the operation may fail. .It Fn counter_u64_free cnt Free previously allocated .Nm @@ -97,14 +98,14 @@ Subtract value of from .Nm .Fa cnt . -API doesn't guarantee any protection from underflow. +The API does not guarantee any protection from underflow. See .Sx IMPLEMENTATION DETAILS . .It Fn counter_u64_fetch cnt Obtain current snapshot of the data collected in .Nm .Fa cnt . -The data obtained isn't guaranteed to be precise. +The data obtained is not guaranteed to be precise. .It Fn counter_u64_zero cnt Clear data collected in .Nm @@ -144,7 +145,7 @@ These are allocated using .Va UMA_ZONE_PCPU .Xr uma 9 zone. -Update operation touches only the field that is private to current CPU. +The update operation only touches the field that is private to current CPU. Fetch operation loops through all per-CPU fields and obtains a snapshot sum of all fields. .Pp