From owner-svn-src-all@freebsd.org Tue Mar 15 01:33:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DE2DAD1410; Tue, 15 Mar 2016 01:33:14 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B70996E; Tue, 15 Mar 2016 01:33:14 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from [172.17.133.77] (dip-cali.panasas.com [64.80.217.3]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.36.0 64bit (built Sep 8 2015)) with ESMTPSA id <0O4200KH01J7VK20@mr11p00im-asmtp004.me.com>; Tue, 15 Mar 2016 00:33:08 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-03-15_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1603150006 User-Agent: Microsoft-MacOutlook/0.0.0.160212 Date: Mon, 14 Mar 2016 17:33:06 -0700 Subject: Re: svn commit: r296880 - in head: share/man/man9 sys/kern sys/sys From: Ravi Pokala Sender: "Pokala, Ravi" To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: Thread-topic: svn commit: r296880 - in head: share/man/man9 sys/kern sys/sys References: <201603150005.u2F050ps086390@repo.freebsd.org> In-reply-to: <201603150005.u2F050ps086390@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2016 01:33:14 -0000 -----Original Message----- From: on behalf of Gleb Smirnoff Date: 2016-03-14, Monday at 17:05 To: , , Subject: svn commit: r296880 - in head: share/man/man9 sys/kern sys/sys >Author: glebius >Date: Tue Mar 15 00:05:00 2016 >New Revision: 296880 >URL: https://svnweb.freebsd.org/changeset/base/296880 > >Log: > Provide sysctl(9) macro to deal with array of counter(9). Hi Gleb, To make sure I'm reading this correctly: (1) The sysctl operates on an opaque array of (uint64_t)s. The elements of the array are not individually accessible. (2) Reading the sysctl populates each element of the userspace array by calling counter_u64_fetch() on the corresponding element of the kernelspace array. (3) Writing the sysctl clears the kernelspace array by calling counter_u64_zero() on each element. For example, if you have a bunch of device statistics, this interface will let you get or clear them all in one shot, but they won't have distinct names. You would have to define an enum to set up names for the array indices. Does that sound correct? Thanks, Ravi (rpokala@)