On Mon, 20 Jun 2011, Miod Vallat wrote: > > uvm_extern.h is the header people should be consuming. change a few uvm.h > > to uvm_extern.h. > > This is not what, say, kern_fork.c does. If you include <uvm.h>, you > don't need any other <uvm_whatever.h>, and definitely not > <uvm/uvm_extern.h>. > > > also, simplify and move the bufcache adjustment code from sysctl to the > > vfs_bio.c where it fits nicer. > > Separate diff please.
Thanks. Let's try this again. Index: kern/exec_subr.c =================================================================== RCS file: /home/tedu/cvs/src/sys/kern/exec_subr.c,v retrieving revision 1.28 diff -u -r1.28 exec_subr.c --- kern/exec_subr.c 14 Nov 2006 18:00:27 -0000 1.28 +++ kern/exec_subr.c 20 Jun 2011 19:22:34 -0000 @@ -41,7 +41,7 @@ #include <sys/mman.h> #include <sys/resourcevar.h> -#include <uvm/uvm.h> +#include <uvm/uvm_extern.h> #ifdef DEBUG /* Index: kern/init_main.c =================================================================== RCS file: /home/tedu/cvs/src/sys/kern/init_main.c,v retrieving revision 1.177 diff -u -r1.177 init_main.c --- kern/init_main.c 18 Apr 2011 21:44:56 -0000 1.177 +++ kern/init_main.c 20 Jun 2011 19:22:34 -0000 @@ -85,7 +85,7 @@ #include <machine/cpu.h> -#include <uvm/uvm.h> +#include <uvm/uvm_extern.h> #include <net/if.h> #include <net/raw_cb.h> Index: kern/kern_fork.c =================================================================== RCS file: /home/tedu/cvs/src/sys/kern/kern_fork.c,v retrieving revision 1.126 diff -u -r1.126 kern_fork.c --- kern/kern_fork.c 6 Jun 2011 17:05:46 -0000 1.126 +++ kern/kern_fork.c 22 Jun 2011 17:07:30 -0000 @@ -62,8 +62,7 @@ #include "systrace.h" #include <dev/systrace.h> -#include <uvm/uvm_extern.h> -#include <uvm/uvm_map.h> +#include <uvm/uvm.h> int nprocs = 1; /* process 0 */ int randompid; /* when set to 1, pid's go random */ Index: kern/kern_sysctl.c =================================================================== RCS file: /home/tedu/cvs/src/sys/kern/kern_sysctl.c,v retrieving revision 1.203 diff -u -r1.203 kern_sysctl.c --- kern/kern_sysctl.c 9 Jun 2011 21:10:55 -0000 1.203 +++ kern/kern_sysctl.c 22 Jun 2011 17:10:40 -0000 @@ -54,7 +54,6 @@ #include <sys/tty.h> #include <sys/disklabel.h> #include <sys/disk.h> -#include <uvm/uvm_extern.h> #include <sys/sysctl.h> #include <sys/msgbuf.h> #include <sys/dkstat.h> @@ -103,6 +102,8 @@ #ifdef SYSVSHM #include <sys/shm.h> #endif + +#include <uvm/uvm.h> extern struct forkstat forkstat; extern struct nchstats nchstats; Index: kern/uipc_mbuf.c =================================================================== RCS file: /home/tedu/cvs/src/sys/kern/uipc_mbuf.c,v retrieving revision 1.157 diff -u -r1.157 uipc_mbuf.c --- kern/uipc_mbuf.c 4 May 2011 16:05:49 -0000 1.157 +++ kern/uipc_mbuf.c 20 Jun 2011 19:22:34 -0000 @@ -89,7 +89,6 @@ #include <machine/cpu.h> -#include <uvm/uvm.h> #include <uvm/uvm_extern.h> #ifdef DDB Index: kern/vfs_bio.c =================================================================== RCS file: /home/tedu/cvs/src/sys/kern/vfs_bio.c,v retrieving revision 1.130 diff -u -r1.130 vfs_bio.c --- kern/vfs_bio.c 5 Jun 2011 19:41:04 -0000 1.130 +++ kern/vfs_bio.c 22 Jun 2011 17:09:49 -0000 @@ -57,7 +57,7 @@ #include <sys/conf.h> #include <sys/kernel.h> -#include <uvm/uvm_extern.h> +#include <uvm/uvm.h> #include <miscfs/specfs/specdev.h> Index: kern/vfs_biomem.c =================================================================== RCS file: /home/tedu/cvs/src/sys/kern/vfs_biomem.c,v retrieving revision 1.17 diff -u -r1.17 vfs_biomem.c --- kern/vfs_biomem.c 7 Apr 2011 19:07:42 -0000 1.17 +++ kern/vfs_biomem.c 20 Jun 2011 19:22:34 -0000 @@ -24,7 +24,6 @@ #include <sys/mount.h> #include <uvm/uvm_extern.h> -#include <uvm/uvm.h> vaddr_t buf_kva_start, buf_kva_end; int buf_needva; Index: sys/pipe.h =================================================================== RCS file: /home/tedu/cvs/src/sys/sys/pipe.h,v retrieving revision 1.13 diff -u -r1.13 pipe.h --- sys/pipe.h 21 Nov 2005 18:16:46 -0000 1.13 +++ sys/pipe.h 20 Jun 2011 19:22:34 -0000 @@ -27,7 +27,6 @@ #ifndef _KERNEL #include <sys/time.h> /* for struct timeval */ #include <sys/selinfo.h> /* for struct selinfo */ -#include <uvm/uvm_extern.h> /* for vm_page_t */ #include <machine/param.h> /* for PAGE_SIZE */ #endif /* _KERNEL */ Index: sys/user.h =================================================================== RCS file: /home/tedu/cvs/src/sys/sys/user.h,v retrieving revision 1.7 diff -u -r1.7 user.h --- sys/user.h 29 Jun 2010 20:48:50 -0000 1.7 +++ sys/user.h 20 Jun 2011 19:22:34 -0000 @@ -42,8 +42,6 @@ #include <sys/uio.h> #endif #include <sys/resourcevar.h> -#include <uvm/uvm_extern.h> /* XXX */ -#include <sys/sysctl.h> /* Index: sys/vnode.h =================================================================== RCS file: /home/tedu/cvs/src/sys/sys/vnode.h,v retrieving revision 1.109 diff -u -r1.109 vnode.h --- sys/vnode.h 5 Apr 2011 14:34:16 -0000 1.109 +++ sys/vnode.h 20 Jun 2011 19:23:55 -0000 @@ -40,7 +40,7 @@ #include <sys/selinfo.h> #include <sys/tree.h> -#include <uvm/uvm.h> +#include <uvm/uvm_extern.h> #include <uvm/uvm_vnode.h> /*