Deleted Added
full compact
vfs_cache.c (155385) vfs_cache.c (157799)
1/*-
2 * Copyright (c) 1989, 1993, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Poul-Henning Kamp of the FreeBSD Project.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)vfs_cache.c 8.5 (Berkeley) 3/22/95
33 */
34
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1989, 1993, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Poul-Henning Kamp of the FreeBSD Project.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)vfs_cache.c 8.5 (Berkeley) 3/22/95
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/kern/vfs_cache.c 155385 2006-02-06 10:15:27Z jeff $");
36__FBSDID("$FreeBSD: head/sys/kern/vfs_cache.c 157799 2006-04-16 18:38:30Z jmg $");
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/kernel.h>
41#include <sys/lock.h>
42#include <sys/mutex.h>
43#include <sys/sysctl.h>
44#include <sys/mount.h>

--- 91 unchanged lines hidden (view full) ---

136 uma_zfree(((ncp)->nc_nlen <= CACHE_PATH_CUTOFF) ? \
137 cache_zone_small : cache_zone_large, (ncp)); \
138} while (0)
139
140static int doingcache = 1; /* 1 => enable the cache */
141SYSCTL_INT(_debug, OID_AUTO, vfscache, CTLFLAG_RW, &doingcache, 0, "");
142
143/* Export size information to userland */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/kernel.h>
41#include <sys/lock.h>
42#include <sys/mutex.h>
43#include <sys/sysctl.h>
44#include <sys/mount.h>

--- 91 unchanged lines hidden (view full) ---

136 uma_zfree(((ncp)->nc_nlen <= CACHE_PATH_CUTOFF) ? \
137 cache_zone_small : cache_zone_large, (ncp)); \
138} while (0)
139
140static int doingcache = 1; /* 1 => enable the cache */
141SYSCTL_INT(_debug, OID_AUTO, vfscache, CTLFLAG_RW, &doingcache, 0, "");
142
143/* Export size information to userland */
144SYSCTL_INT(_debug, OID_AUTO, vnsize, CTLFLAG_RD, 0, sizeof(struct vnode), "");
145SYSCTL_INT(_debug, OID_AUTO, ncsize, CTLFLAG_RD, 0, sizeof(struct namecache), "");
144SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, 0,
145 sizeof(struct namecache), "");
146
147/*
148 * The new name cache statistics
149 */
150static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, "Name cache statistics");
151#define STATNODE(mode, name, var) \
152 SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, "");
153STATNODE(CTLFLAG_RD, numneg, &numneg);

--- 722 unchanged lines hidden ---
146
147/*
148 * The new name cache statistics
149 */
150static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, "Name cache statistics");
151#define STATNODE(mode, name, var) \
152 SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, "");
153STATNODE(CTLFLAG_RD, numneg, &numneg);

--- 722 unchanged lines hidden ---