Re: INVARIANTS and -current
Steve Kargl <[EMAIL PROTECTED]> writes: > Eivind Eklund wrote: > > (Based on suggestion from Robert Watson.) > > > > I want to enable INVARIANTS by default in -current. This result in some > > slowdown, but it also makes it more likely that we'll find bugs quickly. > > People that want to run -current should know enough to disable it if it is > > in the way, anyway. > > I support your proposal. But, have a question: Has > anyone actually measured the performance impact of > INVARIANTS? I'm tempted to suggest that INVARIANTS > should be the default in not only -current in 5.0 > when she's released. Anyone interested in performance > in 5.0 will build custom kernels, and so he can turn > INVARIANTS off. sorry for the late answer. well, I'm not at all w/ you to enable INVARIANTS in -stable. the reason is simple. I had INVARIANTS for months (years?), but in september, I got plenty of "TRAP FAULT 12 and calcru: monotonisation" because of this. after disabling INVARIANTS, no problems anymore. I've posted a message about that in -stable w/ no answer, as I remember me. so, before to enable INVARIANTS in -stable or anywhere, the code should be much better checked, at least around kern_resource.c. Cyrille. -- home: mailto:[EMAIL PROTECTED] work: mailto:[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: INVARIANTS and -current
On Tue, Oct 31, 2000 at 10:06:14PM -0700, [EMAIL PROTECTED] wrote: > Could someone give a quick explanation what INVARIANTS does? It adds more internal consistency checks to the kernel. This make bugs show up more promptly and in a more predictable fashion, which again makes it easier to fix the bugs. (It also makes the bugs more likely to result in a crash and less likely to result in data corruption, which IMO is good.) Eivind. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: INVARIANTS and -current
Could someone give a quick explanation what INVARIANTS does? JAn On Wed, 1 Nov 2000, Boris Popov wrote: > On Tue, 31 Oct 2000, Eivind Eklund wrote: > > > I want to enable INVARIANTS by default in -current. This result in some > > slowdown, but it also makes it more likely that we'll find bugs quickly. > > People that want to run -current should know enough to disable it if it is > > in the way, anyway. > > > > Well-reasoned objections welcome. > > Yes, running kernel with INVARIANTS is a very good idea (in fact, > my -current setup runs it for over a year now). But this option will > produce inconsistent data structures in the kernel and modules (just like > with SMP case). While it is recommended to avoid modules on -current - I'm > don't agree with this statement because many people use them. > > In any way, fix for this is very simple (it assumes that > INVARIANTS defined somewhere in the make.conf or sys.mk): > > Index: conf/kmod.mk > === > RCS file: /home/ncvs/src/sys/conf/kmod.mk,v > retrieving revision 1.83 > diff -u -r1.83 kmod.mk > --- conf/kmod.mk 2000/09/05 22:37:46 1.83 > +++ conf/kmod.mk 2000/09/30 05:55:55 > @@ -90,6 +90,10 @@ > CFLAGS+= ${COPTS} -D_KERNEL ${CWARNFLAGS} > CFLAGS+= -DKLD_MODULE > > +.if defined(INVARIANTS) > +CFLAGS+= -DINVARIANTS > +.endif > + > # Don't use any standard or source-relative include directories. > # Since -nostdinc will annull any previous -I paths, we repeat all > # such paths after -nostdinc. It doesn't seem to be possible to > > -- > Boris Popov > http://www.butya.kz/~bp/ > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: INVARIANTS and -current
On Tue, 31 Oct 2000, Eivind Eklund wrote: > I want to enable INVARIANTS by default in -current. This result in some > slowdown, but it also makes it more likely that we'll find bugs quickly. > People that want to run -current should know enough to disable it if it is > in the way, anyway. > > Well-reasoned objections welcome. Yes, running kernel with INVARIANTS is a very good idea (in fact, my -current setup runs it for over a year now). But this option will produce inconsistent data structures in the kernel and modules (just like with SMP case). While it is recommended to avoid modules on -current - I'm don't agree with this statement because many people use them. In any way, fix for this is very simple (it assumes that INVARIANTS defined somewhere in the make.conf or sys.mk): Index: conf/kmod.mk === RCS file: /home/ncvs/src/sys/conf/kmod.mk,v retrieving revision 1.83 diff -u -r1.83 kmod.mk --- conf/kmod.mk2000/09/05 22:37:46 1.83 +++ conf/kmod.mk2000/09/30 05:55:55 @@ -90,6 +90,10 @@ CFLAGS+= ${COPTS} -D_KERNEL ${CWARNFLAGS} CFLAGS+= -DKLD_MODULE +.if defined(INVARIANTS) +CFLAGS+= -DINVARIANTS +.endif + # Don't use any standard or source-relative include directories. # Since -nostdinc will annull any previous -I paths, we repeat all # such paths after -nostdinc. It doesn't seem to be possible to -- Boris Popov http://www.butya.kz/~bp/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: INVARIANTS and -current
Eivind Eklund wrote: > (Based on suggestion from Robert Watson.) > > I want to enable INVARIANTS by default in -current. This result in some > slowdown, but it also makes it more likely that we'll find bugs quickly. > People that want to run -current should know enough to disable it if it is > in the way, anyway. I support your proposal. But, have a question: Has anyone actually measured the performance impact of INVARIANTS? I'm tempted to suggest that INVARIANTS should be the default in not only -current in 5.0 when she's released. Anyone interested in performance in 5.0 will build custom kernels, and so he can turn INVARIANTS off. -- Steve To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message