From owner-svn-src-head@FreeBSD.ORG Mon Feb 16 14:45:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB25A30C; Mon, 16 Feb 2015 14:45:05 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83674B8; Mon, 16 Feb 2015 14:45:05 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5E674B93A; Mon, 16 Feb 2015 09:45:04 -0500 (EST) From: John Baldwin To: Mateusz Guzik Subject: Re: svn commit: r278760 - head/sys/kern Date: Mon, 16 Feb 2015 09:42:54 -0500 Message-ID: <4509701.vaGfDQNhqC@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150214182109.GC18597@dft-labs.eu> References: <201502141702.t1EH2pVa059259@svn.freebsd.org> <20150214182109.GC18597@dft-labs.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 16 Feb 2015 09:45:04 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 16 Feb 2015 14:45:05 -0000 On Saturday, February 14, 2015 07:21:10 PM Mateusz Guzik wrote: > On Sat, Feb 14, 2015 at 05:02:51PM +0000, John Baldwin wrote: > > +SYSCTL_ULONG(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, > > + 0, "Number of vnodes created by getnewvnode"); > > + > > [..] > > > +static u_long recycles_count; > > +SYSCTL_ULONG(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, 0, > > + "Number of vnodes recycled to avoid exceding kern.maxvnodes"); > > + > > CTLFLAG_MPSAFE? #define SYSCTL_ULONG(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_ULONG | CTLFLAG_MPSAFE | (access), \ ptr, val, sysctl_handle_long, "LU", descr); \ CTASSERT((((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_ULONG) && \ sizeof(unsigned long) == sizeof(*(ptr))) All the trivial sysctls already include CTLFLAG_MPSAFE so that I didn't have to go spray that flag all over the tree. Only SYSCTL_PROC nodes need to be explicitly tagged. -- John Baldwin