Conrad Sabatier
2006-Feb-10 15:09 UTC
CFLAGS in libc_r, libpthread and libthr, and MUTEX stuff in kern_mutex.c
Given that STABLE is supposed to be...well...*stable* :-) ... Could we possibly remove "-D_PTHREADS_INVARIANTS", "-D_LOCK_DEBUG" and "-g" from the CFLAGS in the Makefiles for libc_r, libpthread and libthr? I've been under the impression that these options were only intended for testing/debugging under CURRENT. Granted, it's a simple matter to patch the Makefiles after an update/before a buildworld, but it would be nice not to have to do so. On a related note, I was rather surprised to discover recently that in sys/kern/kern_mutex.c, the MUTEX_WAKE_ALL option is forcibly defined if not already defined in the user's kernel config. While the accompanying comment (in mutex.c) would seem to indicate that there's good reason for doing so at this time, at the very least, this should be documented in sys/conf/NOTES as well. Additionally, it should also be made unmistakably clear that certain other mutex-related options -- namely, ADAPTIVE_GIANT and NO_ADAPTIVE_MUTEXES -- have absolutely no effect whatsoever unless SMP is also defined. While I suppose this might be inferred from the fact that they're listed under the SMP section of NOTES, nonetheless, there is a chance that this relationship may go unrecognized. Thank you. -- Conrad J. Sabatier <conrads@cox.net> -- "In Unix veritas"
Kris Kennaway
2006-Feb-10 16:53 UTC
CFLAGS in libc_r, libpthread and libthr, and MUTEX stuff in kern_mutex.c
On Fri, Feb 10, 2006 at 05:00:18PM -0600, Conrad Sabatier wrote:> Given that STABLE is supposed to be...well...*stable* :-) ... > > Could we possibly remove "-D_PTHREADS_INVARIANTS", "-D_LOCK_DEBUG" and "-g" > from the CFLAGS in the Makefiles for libc_r, libpthread and libthr? I've > been under the impression that these options were only intended for > testing/debugging under CURRENT.I think your impressions are wrong. For example, -g has no effect on the installed code (since it's stripped), and IIRC -D_PTHREADS_INVARIANTS doesn't have a run-time penalty either.> On a related note, I was rather surprised to discover recently that in > sys/kern/kern_mutex.c, the MUTEX_WAKE_ALL option is forcibly defined if not > already defined in the user's kernel config. While the accompanying > comment (in mutex.c) would seem to indicate that there's good reason for > doing so at this time, at the very least, this should be documented in > sys/conf/NOTES as well. > > Additionally, it should also be made unmistakably clear that certain other > mutex-related options -- namely, ADAPTIVE_GIANT and NO_ADAPTIVE_MUTEXES -- > have absolutely no effect whatsoever unless SMP is also defined. While I > suppose this might be inferred from the fact that they're listed under the > SMP section of NOTES, nonetheless, there is a chance that this relationship > may go unrecognized.Sounds like you can submit a patch for these. Kris -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060210/4589a6b8/attachment.bin
Daniel Eischen
2006-Feb-10 22:14 UTC
CFLAGS in libc_r, libpthread and libthr, and MUTEX stuff in kern_mutex.c
On Fri, 10 Feb 2006, Conrad Sabatier wrote:> Given that STABLE is supposed to be...well...*stable* :-) ... > > Could we possibly remove "-D_PTHREADS_INVARIANTS", "-D_LOCK_DEBUG" and "-g" > from the CFLAGS in the Makefiles for libc_r, libpthread and libthr? I've > been under the impression that these options were only intended for > testing/debugging under CURRENT.<sigh> Please go search the archives for the last time this was brought up. You are under the mistaken assumption that there is a performance impact. I think next time I'm in there, I'll just change the names of the macros or just remove them completely so they're always enabled :( -- DE