Date: Fri, 13 Oct 2017 23:01:45 +0200 From: Mateusz Guzik <mjguzik@gmail.com> To: Ian Lepore <ian@freebsd.org> Cc: Mateusz Guzik <mjg@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r324609 - head/sys/sys Message-ID: <CAGudoHHkZn=kTkCMT9G=dVbsSYx0BNwRoLrJOEdjACrRS2oJxw@mail.gmail.com> In-Reply-To: <1507928067.8386.84.camel@freebsd.org> References: <201710132031.v9DKVueS089009@repo.freebsd.org> <1507928067.8386.84.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 13, 2017 at 10:54 PM, Ian Lepore <ian@freebsd.org> 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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHHkZn=kTkCMT9G=dVbsSYx0BNwRoLrJOEdjACrRS2oJxw>