From owner-svn-src-user@FreeBSD.ORG Sun Oct 28 21:49:22 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 4424695E for ; Sun, 28 Oct 2012 21:49:22 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 778BC8FC15 for ; Sun, 28 Oct 2012 21:49:21 +0000 (UTC) Received: (qmail 93011 invoked from network); 28 Oct 2012 23:26:22 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 28 Oct 2012 23:26:22 -0000 Message-ID: <508DA85F.3090503@freebsd.org> Date: Sun, 28 Oct 2012 22:49:19 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org 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/... References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> <508965B3.2020705@freebsd.org> <5089A913.2040603@freebsd.org> <508A89EF.5070805@freebsd.org> <508DA194.6060807@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: mdf@freebsd.org, src-committers@freebsd.org, John Baldwin , svn-src-user@freebsd.org, Jeff Roberson , Bruce Evans 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: Sun, 28 Oct 2012 21:49:22 -0000 On 28.10.2012 22:32, Attilio Rao wrote: > On Sun, Oct 28, 2012 at 9:20 PM, Andre Oppermann wrote: >> On 28.10.2012 18:42, Attilio Rao wrote: >>> >>> On Sat, Oct 27, 2012 at 5:27 PM, Attilio Rao wrote: >>>> >>>> Here we go with further comments tweaks. >>>> Also, in order to make it a complete NOP from KPI perspective I had to >>>> change the way the mtx_assert() wrapper was implemented as in v1 it >>>> wasn't correctly handling the const qualifier. >>>> I think the result is better now and you should refer to this patch for >>>> reviews: >>>> http://www.freebsd.org/~attilio/mtx_decoupled2.patch >> >> >> Thank you for the updated patch. If the others more versed in this >> area are happy with it I'm not objecting. >> >> >>> BTW, the mtx_sysuninit() introduction can be avoided by using this other >>> trick: >>> #define MTX_SYSINIT(name, mtx, desc, opts) \ >>> static struct mtx_args name##_args = { \ >>> (mtx), \ >>> (desc), \ >>> (opts) \ >>> }; \ >>> SYSINIT(name##_mtx_sysinit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ >>> mtx_sysinit, &name##_args); \ >>> SYSUNINIT(name##_mtx_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ >>> _mtx_destroy, __DEVOLATILE(void *, &(mtx)->mtx_lock)) >>> >>> I'm just not sure that I would like the use of __DEVOLATILE() even if >>> it would help in this case when introducing MTX_SYSINIT_UNSHARE() >>> because we will just need to reuse the same code. >> >> >> I'm not really happy about the _unshare naming. Something like >> _aligned or _cachline would be much more obvious on what it does. > > I agree. Infact if we want to apply this to ie. sx locks too _unshared > will generate too much confusion (as already reported by Jeff too). > I'd say _aligned is good to go. _aligned can be slightly confusing too for someone not aware of the differences of alignment (begin of structure aligned) and the additional padding to a cache line. So _cacheline is probably more expressive and spells out what the real purpose is. -- Andre