Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2018 14:36:04 -0700
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r331414 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Message-ID:  <20180402213604.GC1917@FreeBSD.org>
In-Reply-To: <201803230250.w2N2odbi085924@repo.freebsd.org>
References:  <201803230250.w2N2odbi085924@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
  Alexander,

Does it make sense to leave the manual padding at all,
if you got compiler hint __aligned(CACHE_LINE_SIZE)?

With manual padding can get broken again later.

On Fri, Mar 23, 2018 at 02:50:39AM +0000, Alexander Motin wrote:
A> Author: mav
A> Date: Fri Mar 23 02:50:38 2018
A> New Revision: 331414
A> URL: https://svnweb.freebsd.org/changeset/base/331414
A> 
A> Log:
A>   Reduce struct aggsum_bucket padding to fit into one cache line.
A>   
A>   Reported by:	mjg
A> 
A> Modified:
A>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h
A> 
A> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h
A> ==============================================================================
A> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h	Fri Mar 23 02:45:09 2018	(r331413)
A> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h	Fri Mar 23 02:50:38 2018	(r331414)
A> @@ -29,7 +29,7 @@ typedef struct aggsum_bucket {
A>  	kmutex_t asc_lock;
A>  	int64_t asc_delta;
A>  	uint64_t asc_borrowed;
A> -	uint64_t asc_pad[4]; /* pad out to cache line (64 bytes) */
A> +	uint64_t asc_pad[2]; /* pad out to cache line (64 bytes) */
A>  } aggsum_bucket_t __aligned(CACHE_LINE_SIZE);
A>  
A>  /*
A> 

-- 
Gleb Smirnoff



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180402213604.GC1917>