On Fri, Oct 13, 2017 at 10:54 PM, Ian Lepore <[email protected]> wrote:

> On Fri, 2017-10-13 at 20:31 +0000, Mateusz Guzik wrote:
> > Author: mjg
> > Date: Fri Oct 13 20:31:56 2017
> > New Revision: 324609
> > URL: https://svnweb.freebsd.org/changeset/base/324609
> >
> > Log:
> >   mtx: change MTX_UNOWNED from 4 to 0
> >
> >   The value is spread all over the kernel and zeroing a register is
> >   cheaper/shorter than setting it up to an arbitrary value.
> >
> >   Reduces amd64 GENERIC-NODEBUG .text size by 0.4%.
> >
> >   MFC after:  1 week
> >
>
> If you MFC this, won't that break the ABI for modules compiled against
> earlier versions of the branch?
>
> Also, won't this trigger a need to recompile out of tree modules such
> as video drivers, virtualbox, etc?  Does that need an UPDATING entry?
>
> -- Ian
>
>
All modules (even ones provided with base) always call dedicated
primitives, i.e. they never inspect the lock value.

The only non-opaque part of locks (and annoying at that) is placememnt
of the lock word, which right not is at the very end. This happens to
matter when passing the lock around to funcs like _sleep which
automagically determine what it is.

I am considering a change for head which moves the word to the beginning
instead and that probably wont be MFCable unless I come up with a
reasonably non-terrible kludge.

-- 
Mateusz Guzik <mjguzik gmail.com>
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to