Date: Sun, 28 Oct 2012 21:32:19 +0000 From: Attilio Rao <attilio@freebsd.org> To: Andre Oppermann <andre@freebsd.org> Cc: mdf@freebsd.org, src-committers@freebsd.org, John Baldwin <jhb@freebsd.org>, svn-src-user@freebsd.org, Jeff Roberson <jroberson@jroberson.net>, Bruce Evans <brde@optusnet.com.au> 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/... Message-ID: <CAJ-FndAVt-m39i8O%2B4NapFHrYONOVEpJk3gt0%2BXSFBF8YSa4Sg@mail.gmail.com> In-Reply-To: <508DA194.6060807@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <CAJ-FndAG-Qp%2B1aQvoL7YRj=R151Qe9_wNrUeOAaDsdYao_-zCQ@mail.gmail.com> <201210241414.30723.jhb@freebsd.org> <CAJ-FndAu6BGeMMbtFTLaSqy82mbhM9CVEyJ3Lb1WhAogJr59yA@mail.gmail.com> <CAJ-FndBqRpkBhCntd2aqwVYPu%2B2EHGeuXr5srLtrNNDK-ButxA@mail.gmail.com> <508965B3.2020705@freebsd.org> <CAJ-FndCMMH2Qy=rzzxagNVfgO9vF0xZY6B_vrnjmv_dXKNB5Dg@mail.gmail.com> <5089A913.2040603@freebsd.org> <CAJ-FndApwOo8xmZQyeqq0bGp8P13QWRqgmSDNg1_hbm7nrpOAQ@mail.gmail.com> <508A89EF.5070805@freebsd.org> <CAJ-FndC%2BujncG54_RMwKwdtvNCRJ2QojNuADWn59puwayCHs6A@mail.gmail.com> <CAJ-FndAhYk4R2AD3COmkOv3vYQganGXQKuO%2BkMQLaefTQSAejQ@mail.gmail.com> <CAJ-FndD40whTV=o1P8gMCaq9tKEtRg56xMKdjqnapVR6Awo7og@mail.gmail.com> <508DA194.6060807@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 28, 2012 at 9:20 PM, Andre Oppermann <andre@freebsd.org> wrote: > On 28.10.2012 18:42, Attilio Rao wrote: >> >> On Sat, Oct 27, 2012 at 5:27 PM, Attilio Rao <attilio@freebsd.org> 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. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-FndAVt-m39i8O%2B4NapFHrYONOVEpJk3gt0%2BXSFBF8YSa4Sg>