Re: INVARIANTS in sys/sys/sx.h
- From: Ulrich Spoerlein <uspoerlein@xxxxxxxxx>
- Date: Mon, 28 Aug 2006 17:46:55 +0200
Erik Trulsson wrote:
On Mon, Aug 28, 2006 at 11:38:47PM +0900, Jun Kuriyama wrote:
I found this when I compiled my kernel with INVARIANTS without
INVARIANT_SUPPORT.
It says in /usr/src/syc/conf/NOTES that INVARIANT_SUPPORT is a prerequisite
for INVARIANTS. I.e. having a kernel with INVARIANTS without
INVARIANT_SUPPORT is not expected to work.
I once was bitten by this, since I forgot this in my kernel conf and
wondered about build breakage in the ata subsystem. I read the part
about kernel+module debugging in NOTES, but I truly wonder: is this used
regularly by developers?
There are only 7 files under /src that do "ifdef INVARIANT_SUPPORT",
couldn't we just merge the too?
List of affected files under /src:
./kern/kern_mutex.c:#ifdef INVARIANT_SUPPORT
./kern/kern_sx.c:#ifdef INVARIANT_SUPPORT
./kern/kern_sx.c:#endif /* INVARIANT_SUPPORT */
./kern/subr_witness.c:#ifdef INVARIANT_SUPPORT
./kern/subr_witness.c:#endif /* INVARIANT_SUPPORT */
./sys/filedesc.h:#ifdef INVARIANT_SUPPORT
./sys/lock.h:#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || defined(KTR) || defined(MUTEX_PROFILING)
./sys/mutex.h:#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT)
./sys/mutex.h: * The constants need to be defined for INVARIANT_SUPPORT infrastructure
./sys/mutex.h:#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT)
./sys/sx.h:#ifdef INVARIANT_SUPPORT
./sys/sx.h:#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT)
As you can see, lock.h and mutex.h work with both names and sx.h only
has one out of two places, where it actually matters.
Ulrich Spoerlein
PS: The color of this bikeshed is blue. This is not negotiable!
--
A: Yes.
Q: Are you sure?_______________________________________________
A: Because it reverses the logical flow of conversation.
Q: Why is top posting frowned upon?
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"
- References:
- INVARIANTS in sys/sys/sx.h
- From: Jun Kuriyama
- Re: INVARIANTS in sys/sys/sx.h
- From: Erik Trulsson
- INVARIANTS in sys/sys/sx.h
- Prev by Date: Re: HEADS UP: GCC 3.4.6 update complete
- Next by Date: zonelimit livelock
- Previous by thread: Re: INVARIANTS in sys/sys/sx.h
- Next by thread: Re: INVARIANTS in sys/sys/sx.h
- Index(es):
Relevant Pages
- Re: Performance issue
... make sure that you have WITNESS and INVARIANTS off in your ... You might
also want to recompile your kernel with the SMP ... switches are consistent with
the one-per-10msec I saw before. ... (freebsd-stable) - Re: panic: sorele
... > So you can build a kernel with INVARIANT_SUPPORT but no INVARIANTS but still ...
sorele when the kernel is compiled with SMP ... I will compile my kernel
without SMP... ... (freebsd-current) - Re: MSDOSFS woes
... Were you running with INVARIANTS on? ... > and causing kernel memory pool
to become corrupted. ... First problem is with newfs_msdos(and kernel part of MSDOSFS).
... I've been able to reproduce the "wdrain" lockup ... (freebsd-current) - Re: computer becomes slow when compiling something
... enabled kernel. ... can consume a lot of CPU in kernel on a very active
system, ... Especially WITNESS. ... WITNESS and INVARIANTS. ... (freebsd-current) - Re: 5.2.1-RC hangs occasionally when sound files are played using the pcm driver
... I'll try to reproduce it with witness and invariants first, ... I had
built an SMP kernel. ... Do you Yahoo!? ... (freebsd-hackers)