Date: Mon, 16 Feb 2015 09:44:49 -0500 From: John Baldwin <jhb@freebsd.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r278760 - head/sys/kern Message-ID: <3743615.TmWIRblad9@ralph.baldwin.cx> In-Reply-To: <20150214181803.GM15484@FreeBSD.org> References: <201502141702.t1EH2pVa059259@svn.freebsd.org> <20150214181803.GM15484@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, February 14, 2015 09:18:03 PM Gleb Smirnoff wrote: > On Sat, Feb 14, 2015 at 05:02:51PM +0000, John Baldwin wrote: > J> Author: jhb > J> Date: Sat Feb 14 17:02:51 2015 > J> New Revision: 278760 > J> URL: https://svnweb.freebsd.org/changeset/base/278760 > J> > J> Log: > J> Add two new counters for vnode life cycle events: > J> - vfs.recycles counts the number of vnodes forcefully recycled to avoid > J> exceeding kern.maxvnodes. > J> - vfs.vnodes_created counts the number of vnodes created by successful > J> calls to getnewvnode(). > J> > J> Differential Revision: https://reviews.freebsd.org/D1671 > J> Reviewed by: kib > J> MFC after: 1 week > > Why don't use counter(9) for that? Would avoid atomics. Just didn't think of it (that and the other counters in vfs_subr all use atomics). A more general patch to convert the various counters in this file would probably be useful. In the case of these specific counters: if you are recycling and creating vnodes so quickly that cache contention on these lines is problematic, you probably have much bigger problems such that the counters would be in the noise given all the other crap involved in vnode life-cycle management. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3743615.TmWIRblad9>