From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 14:14:57 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1F069CE; Wed, 24 Oct 2012 14:14:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 900348FC0C; Wed, 24 Oct 2012 14:14:57 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 008ACB911; Wed, 24 Oct 2012 10:14:56 -0400 (EDT) From: John Baldwin To: Andre Oppermann Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... Date: Wed, 24 Oct 2012 10:05:38 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210221418.q9MEINkr026751@svn.freebsd.org> <50872624.6060901@freebsd.org> In-Reply-To: <50872624.6060901@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210241005.38977.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 24 Oct 2012 10:14:57 -0400 (EDT) Cc: mdf@freebsd.org, src-committers@freebsd.org, Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 14:14:57 -0000 On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: > On 24.10.2012 00:15, mdf@FreeBSD.org wrote: > > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann wrote: > >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. > > > > That doesn't matter. Language basics like variable definitions should > > not be obscured by macros. It either takes longer to figure out what > > a variable is (because one needs to look up the definition of the > > macro) or makes it almost impossible (because now e.g. cscope doesn't > > know this is a variable definition. > > Sigh, cscope doesn't expand macros? > > Is there a way to do the cache line alignment in a sane way without > littering __aligned(CACHE_LINE_SIZE) all over the place? I was hoping to do something with an anonymous union or some such like: union mtx_aligned { struct mtx; char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; } I don't know if there is a useful way to define an 'aligned mutex' type that will transparently map to a 'struct mtx', e.g.: typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; -- John Baldwin