Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2007 12:18:09 -0800
From:      "Kip Macy" <kip.macy@gmail.com>
To:        "John Baldwin" <jhb@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: HEADSUP ABI breakage for future LOCK_PROFILING + non-LOCK_PROFILING usage
Message-ID:  <b1fa29170702271218m4c83e2d3m115a728defae9733@mail.gmail.com>
In-Reply-To: <200702271515.08052.jhb@freebsd.org>
References:  <b1fa29170702262230q2d2e1b03i362a4af4ec0bd595@mail.gmail.com> <200702271515.08052.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Good point about the struct mtx being embedded in arbitrary places in
structures. I'll need to rethink.


On 2/27/07, John Baldwin <jhb@freebsd.org> wrote:
> On Tuesday 27 February 2007 01:30, Kip Macy wrote:
> > The following change will go in shortly unless I hear a good reason
> > not to do so.
> >
> >            -Kip
> >
> > 200702246:
> >         The lock_profile_object in the lock_object has been moved to the
> >         bottom and lock_object ha been moved to the end of all synchronization
> >         primitives so that a kernel compiled without LOCK_PROFILING will
> >         work with modules that are compiled with it. It also gets us closer
> >         to having a kernel compiled with LOCK_PROFILING work with modules
> >         compiled without. The kernel and all modules will need to be
> >         re-compiled.
>
> The kernel + modules compiled together should already work if LOCK_PROFILING
> is defined when the modules are built, and the new kernel build glue is
> supposed to do that for you already.
>
> However, this won't help with mixing the PROFILING and non-PROFILING cases
> because 'struct mtx' will still be variant sized and several structures
> have 'struct mtx' embedded in them (most notably struct proc) and having
> 'struct mtx' change size breaks the ABI because the offsets of all the
> members after 'p_mtx' change.  E.g. all the p->p_vmspace offsets would be
> different in the LOCK_PROFILING vs non-LOCK_PROFILING kernels.
>
> Also, this would break the ddb 'show lock' command, though that may be less
> important.
>
> --
> John Baldwin
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b1fa29170702271218m4c83e2d3m115a728defae9733>