svn commit: r205231 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

John Baldwin jhb at freebsd.org
Wed Mar 17 12:46:06 UTC 2010


On Tuesday 16 March 2010 6:17:22 pm Kip Macy wrote:
> Author: kmacy
> Date: Tue Mar 16 22:17:21 2010
> New Revision: 205231
> URL: http://svn.freebsd.org/changeset/base/205231
> 
> Log:
>   - reduce contention by breaking up ARC state locks in to 16 for data
>     and 16 for metadata
>   - export L2ARC tunables as sysctls
>   - add several kstats to track L2ARC state more precisely
>   - avoid holding a contended lock when atomically incrementing a
>     contended counter (no lock protection needed for atomics)
> 
> Modified:
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
> 
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
> 
==============================================================================
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Tue Mar 16 
21:44:21 2010	(r205230)
> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Tue Mar 16 
22:17:21 2010	(r205231)
> @@ -131,6 +131,7 @@
>  #include <sys/kstat.h>
>  #include <sys/sdt.h>
>  
> +#include <sys/ktr.h>
>  #include <vm/vm_pageout.h>
>  
>  static kmutex_t		arc_reclaim_thr_lock;
> @@ -186,6 +187,11 @@ SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_min,
>  SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RDTUN,
>      &zfs_mdcomp_disable, 0, "Disable metadata compression");
>  
> +#ifdef ZIO_USE_UMA
> +extern kmem_cache_t	*zio_buf_cache[];
> +extern kmem_cache_t	*zio_data_buf_cache[];
> +#endif
> +
>  /*
>   * Note that buffers can be in one of 6 states:
>   *	ARC_anon	- anonymous (discussed below)
> @@ -218,13 +224,31 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_di
>   * second level ARC benefit from these fast lookups.
>   */
>  
> +#define	ARCS_LOCK_PAD		128

Please use CACHE_LINE_SIZE instead of hardcoding 128.

-- 
John Baldwin


More information about the svn-src-head mailing list