svn commit: r278760 - head/sys/kern

John Baldwin jhb at freebsd.org
Mon Feb 16 14:45:05 UTC 2015


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


More information about the svn-src-all mailing list