for your amusement i present the following diff, which slightly
reorders the include search path for a kernel. this doesn't change
anything, except to spare us some lookups for files that don't exist.

ktrace results, before and after, namei calls:
  304420 1217680 14560939 k2
  266626 1066504 13448913 k3

(there are of course, several other archictures as well)

Index: Makefile.i386
===================================================================
RCS file: /cvs/src/sys/arch/i386/conf/Makefile.i386,v
retrieving revision 1.85
diff -u -p -r1.85 Makefile.i386
--- Makefile.i386       28 Aug 2012 21:03:32 -0000      1.85
+++ Makefile.i386       29 Mar 2013 19:23:40 -0000
@@ -21,7 +21,7 @@ S!=   cd ../../../..; pwd
 _machdir?=     $S/arch/${_mach}
 _archdir?=     $S/arch/${_arch}
 
-INCLUDES=      -nostdinc -I. -I$S -I$S/arch
+INCLUDES=      -nostdinc -I$S -I. -I$S/arch
 CPPFLAGS=      ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -MD -MP
 CWARNFLAGS=    -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
                -Wno-main -Wno-uninitialized -Wno-format \

Reply via email to