Re: HEADSUP ABI breakage for future LOCK_PROFILING + non-LOCK_PROFILING usage



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
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Panic linux ldconfig with MUTEX_PROFILING
    ... > I'm trying to use MUTEX_PROFILING, but paniced in linux ldconfig. ... > Any clues? ... is COMPAT_LINUX compiled into the kernel? ... use the wrong struct mtx. ...
    (freebsd-current)
  • Re: HEADSUP ABI breakage for future LOCK_PROFILING + non-LOCK_PROFILING usage
    ... I'll need to rethink. ... The kernel + modules compiled together should already work if LOCK_PROFILING ... this won't help with mixing the PROFILING and non-PROFILING cases ... because 'struct mtx' will still be variant sized and several structures ...
    (freebsd-current)
  • Re: Top half Vs Bottom Half
    ... Kernel handles interrupt handler firstly, ... whether there is any bottom half functions should be run -before- it ... If a interrupt happens during bottom-half running, ... > My understanding is that the top half runs in interrupt context, ...
    (comp.os.linux.development.system)
  • [IDE-SCSI] Mounting a badly burned DVD generates OOPS
    ... Mounting a dvd with mount will generate an oops. ... of my kernel .config and lspci, so they're at the bottom too: ... My kernel is a patched 2.4.21. ... were loaded during both the oops and the ksymoops trace) ...
    (Linux-Kernel)
  • Re: [PATCH] de-semaphorize smackfs
    ... remaining semaphore users in the kernel were actually doing. ... quick grep for down_interruptible, smackfs remained at the bottom of ...
    (Linux-Kernel)