It turns out that in netbsd-5, DIAGNOSTIC and DEBUG are defined in XEN kernels. gson@ discovered this while tracking down a crash running tmpfs rename race tests in netbsd-5 domU. It turns out the crash is not because of xen, but apparently because of bugs in netbsd-5 caught by DEBUG. It's not useful to remove these to hide the bug, but they do slow down the kernel, especially DEBUG. And normal policy is that DIAGNOSTIC is enabled in -current and not on release branches, and DEBUG (and LOCKDEBUG, etc.) is always off. This patch moves netbsd-5 back to the normal policy. I've tested kernels with this change: amd64 dom0, i386 domU. I intend to submit a pullup request to have this applied; speak up if you think I shouldn't. Index: sys/arch/i386/conf/XEN2_DOM0 =================================================================== RCS file: /cvsroot/src/sys/arch/i386/conf/Attic/XEN2_DOM0,v retrieving revision 1.53.2.7 diff -u -p -r1.53.2.7 XEN2_DOM0 --- sys/arch/i386/conf/XEN2_DOM0 19 Jun 2013 07:50:15 -0000 1.53.2.7 +++ sys/arch/i386/conf/XEN2_DOM0 25 Mar 2015 22:52:11 -0000 @@ -50,8 +50,8 @@ options USERCONF # userconf(4) support options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Diagnostic/debugging support options -options DIAGNOSTIC # expensive kernel consistency checks -options DEBUG # expensive debugging checks/support +#options DIAGNOSTIC # expensive kernel consistency checks +#options DEBUG # expensive debugging checks/support options KMEMSTATS # kernel memory statistics (vmstat -m) options DDB # in-kernel debugger options DDB_ONPANIC=1 # see also sysctl(8): `ddb.onpanic' Index: sys/arch/i386/conf/XEN2_DOMU =================================================================== RCS file: /cvsroot/src/sys/arch/i386/conf/Attic/XEN2_DOMU,v retrieving revision 1.19.4.4 diff -u -p -r1.19.4.4 XEN2_DOMU --- sys/arch/i386/conf/XEN2_DOMU 9 Jun 2013 11:44:04 -0000 1.19.4.4 +++ sys/arch/i386/conf/XEN2_DOMU 25 Mar 2015 22:52:11 -0000 @@ -47,8 +47,8 @@ options USERCONF # userconf(4) support options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Diagnostic/debugging support options -options DIAGNOSTIC # expensive kernel consistency checks -options DEBUG # expensive debugging checks/support +#options DIAGNOSTIC # expensive kernel consistency checks +#options DEBUG # expensive debugging checks/support options KMEMSTATS # kernel memory statistics (vmstat -m) options DDB # in-kernel debugger options DDB_ONPANIC=1 # see also sysctl(8): `ddb.onpanic' Index: sys/arch/amd64/conf/XEN3_DOM0 =================================================================== RCS file: /cvsroot/src/sys/arch/amd64/conf/XEN3_DOM0,v retrieving revision 1.33.4.7 diff -u -p -r1.33.4.7 XEN3_DOM0 --- sys/arch/amd64/conf/XEN3_DOM0 19 Jun 2013 07:50:14 -0000 1.33.4.7 +++ sys/arch/amd64/conf/XEN3_DOM0 25 Mar 2015 22:52:11 -0000 @@ -41,8 +41,8 @@ options USERCONF # userconf(4) support options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Diagnostic/debugging support options -options DIAGNOSTIC # expensive kernel consistency checks -options DEBUG # expensive debugging checks/support +#options DIAGNOSTIC # expensive kernel consistency checks +#options DEBUG # expensive debugging checks/support options KMEMSTATS # kernel memory statistics (vmstat -m) options DDB # in-kernel debugger options DDB_ONPANIC=1 # see also sysctl(8): `ddb.onpanic' Index: sys/arch/amd64/conf/XEN3_DOMU =================================================================== RCS file: /cvsroot/src/sys/arch/amd64/conf/XEN3_DOMU,v retrieving revision 1.13.4.4 diff -u -p -r1.13.4.4 XEN3_DOMU --- sys/arch/amd64/conf/XEN3_DOMU 9 Jun 2013 11:44:04 -0000 1.13.4.4 +++ sys/arch/amd64/conf/XEN3_DOMU 25 Mar 2015 22:52:11 -0000 @@ -40,8 +40,8 @@ options USERCONF # userconf(4) support options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Diagnostic/debugging support options -options DIAGNOSTIC # expensive kernel consistency checks -options DEBUG # expensive debugging checks/support +#options DIAGNOSTIC # expensive kernel consistency checks +#options DEBUG # expensive debugging checks/support options KMEMSTATS # kernel memory statistics (vmstat -m) options DDB # in-kernel debugger options DDB_ONPANIC=1 # see also sysctl(8): `ddb.onpanic'
Attachment:
pgpvyvNfPN400.pgp
Description: PGP signature