diff options
author | dyson <dyson@FreeBSD.org> | 1998-01-22 17:30:44 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1998-01-22 17:30:44 +0000 |
commit | 197bd655c435302ddb4156bc654705dfef1d9143 (patch) | |
tree | a91dcc7eb7507f4d0088eb5e1b2e6872c51fd3ea /sys/kern/kern_proc.c | |
parent | f95fe9806cd36e8b1fa77d590b5d1c2d48482618 (diff) | |
download | FreeBSD-src-197bd655c435302ddb4156bc654705dfef1d9143.zip FreeBSD-src-197bd655c435302ddb4156bc654705dfef1d9143.tar.gz |
VM level code cleanups.
1) Start using TSM.
Struct procs continue to point to upages structure, after being freed.
Struct vmspace continues to point to pte object and kva space for kstack.
u_map is now superfluous.
2) vm_map's don't need to be reference counted. They always exist either
in the kernel or in a vmspace. The vmspaces are managed by reference
counts.
3) Remove the "wired" vm_map nonsense.
4) No need to keep a cache of kernel stack kva's.
5) Get rid of strange looking ++var, and change to var++.
6) Change more data structures to use our "zone" allocator. Added
struct proc, struct vmspace and struct vnode. This saves a significant
amount of kva space and physical memory. Additionally, this enables
TSM for the zone managed memory.
7) Keep ioopt disabled for now.
8) Remove the now bogus "single use" map concept.
9) Use generation counts or id's for data structures residing in TSM, where
it allows us to avoid unneeded restart overhead during traversals, where
blocking might occur.
10) Account better for memory deficits, so the pageout daemon will be able
to make enough memory available (experimental.)
11) Fix some vnode locking problems. (From Tor, I think.)
12) Add a check in ufs_lookup, to avoid lots of unneeded calls to bcmp.
(experimental.)
13) Significantly shrink, cleanup, and make slightly faster the vm_fault.c
code. Use generation counts, get rid of unneded collpase operations,
and clean up the cluster code.
14) Make vm_zone more suitable for TSM.
This commit is partially as a result of discussions and contributions from
other people, including DG, Tor Egge, PHK, and probably others that I
have forgotten to attribute (so let me know, if I forgot.)
This is not the infamous, final cleanup of the vnode stuff, but a necessary
step. Vnode mgmt should be correct, but things might still change, and
there is still some missing stuff (like ioopt, and physical backing of
non-merged cache files, debugging of layering concepts.)
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 35e3046..460e9fb 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95 - * $Id: kern_proc.c,v 1.29 1997/10/11 18:31:23 phk Exp $ + * $Id: kern_proc.c,v 1.30 1997/10/12 20:23:52 phk Exp $ */ #include <sys/param.h> @@ -47,6 +47,7 @@ #include <vm/pmap.h> #include <vm/vm_map.h> #include <sys/user.h> +#include <vm/vm_zone.h> static MALLOC_DEFINE(M_PGRP, "pgrp", "process group header"); MALLOC_DEFINE(M_SESSION, "session", "session header"); @@ -82,6 +83,7 @@ struct pgrphashhead *pgrphashtbl; u_long pgrphash; struct proclist allproc; struct proclist zombproc; +vm_zone_t proc_zone; /* * Initialize global process hashing structures. @@ -95,6 +97,7 @@ procinit() pidhashtbl = hashinit(maxproc / 4, M_PROC, &pidhash); pgrphashtbl = hashinit(maxproc / 4, M_PROC, &pgrphash); uihashtbl = hashinit(maxproc / 16, M_PROC, &uihash); + proc_zone = zinit("PROC", sizeof (struct proc), 0, 0, 5); } /* |