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/...
Andre Oppermann
andre at freebsd.org
Sun Oct 28 21:20:23 UTC 2012
On 28.10.2012 18:42, Attilio Rao wrote:
> On Sat, Oct 27, 2012 at 5:27 PM, Attilio Rao <attilio at 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.
> Also, the more I think about this the more I feel convinced that
> mtxlock2mtx() should be static in kern_mutex.c. I can simply add a
> note to _mutex.h as a reminder for it.
Agreed.
--
Andre
More information about the svn-src-user
mailing list