aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* Removed a wrong LK_INTERLOCK flag.Bruce Evans1997-02-271-3/+2
| | | | Notes: svn path=/head/; revision=23157
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-2235-35/+35
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Removed vestiges of Mach lock types.Bruce Evans1997-02-182-14/+1
| | | | | | | | | vm_map.h: Removed #include of <sys/proc.h>. curproc is only used in some macros and users of the macros already include <sys/proc.h>. Notes: svn path=/head/; revision=22878
* Provide an alternative interface to contigmalloc() which allows a specificGarrett Wollman1997-02-132-4/+22
| | | | | | | | map to be used when allocating the kernel va (e.g., mb_map). The VM gurus may want to look this over. Notes: svn path=/head/; revision=22670
* This is the kernel Lite/2 commit. There are some requisite userlandJohn Dyson1997-02-1015-64/+129
| | | | | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org> Notes: svn path=/head/; revision=22521
* Another fix to inheriting shared segments. Do the copy on writeJohn Dyson1997-01-311-1/+9
| | | | | | | | thing if needed. Submitted by: Alan Cox <alc@cs.rice.edu> Notes: svn path=/head/; revision=22156
* Added a check/panic for v_usecount being 0 (no vnode reference) inDavid Greenman1997-01-241-0/+2
| | | | | | | vnode_pager_alloc(). Notes: svn path=/head/; revision=21987
* Fix two problems where a NULL object is dereferenced. One problemJohn Dyson1997-01-221-4/+28
| | | | | | | | was in the VM_INHERIT_SHARE case of vmspace_fork, and also in vm_map_madvise. Submitted by: Alan Cox <alc@cs.rice.edu> Notes: svn path=/head/; revision=21940
* Make MADV_FREE work better. Specifically, it did not wait forJohn Dyson1997-01-201-13/+46
| | | | | | | | | | the page to be unbusy, and it caused some algorithmic problems as a result. There were some other problems with it also, so this is a general cleanup of the code. Submitted by: Douglas Crosher <dtc@scrooge.ee.swin.oz.au> and myself. Notes: svn path=/head/; revision=21881
* Change the map entry flags from bitfields to bitmasks. AllowsJohn Dyson1997-01-167-89/+78
| | | | | | | for some code simplification. Notes: svn path=/head/; revision=21754
* Fix bug related to map entry allocations where a sleep might be attemptedDavid Greenman1997-01-152-13/+3
| | | | | | | | | | | when allocating memory for network buffers at interrupt time. This is due to inadequate checking for the new mcl_map. Fixed by merging mb_map and mcl_map into a single mb_map. Reviewed by: wollman Notes: svn path=/head/; revision=21737
* Removed redundant spl0()'s from kernel processes. They were work-aroundsBruce Evans1997-01-152-5/+0
| | | | | | | for a bug in fork(). Notes: svn path=/head/; revision=21733
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-1435-35/+35
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Slightly correct the code that moves pages from the active to theJohn Dyson1997-01-111-5/+7
| | | | | | | | inactive queue. This is only a minor performance improvement, but will not affect perf on machines that don't have ref bits. Notes: svn path=/head/; revision=21530
* Prepare better for multi-platform by eliminating another requiredJohn Dyson1997-01-113-7/+12
| | | | | | | | pmap routine (pmap_is_referenced.) Upper level recoded to use pmap_ts_referenced. Notes: svn path=/head/; revision=21529
* Undo the collapse breakage (swap space usage problem.)John Dyson1997-01-034-16/+4
| | | | Notes: svn path=/head/; revision=21258
* Guess what? We left alot of the old collapse code that is not neededJohn Dyson1997-01-014-2/+15
| | | | | | | | | anymore with the "full" collapse fix that we added about 1yr ago!!! The code has been removed by optioning it out for now, so we can put it back in ASAP if any problems are found. Notes: svn path=/head/; revision=21157
* A very significant improvement in the management of process mapsJohn Dyson1996-12-312-43/+46
| | | | | | | | | | | | | | | | | and objects. Previously, "fancy" memory management techniques such as that used by the M3 RTS would have the tendancy of chopping up processes allocated memory into lots of little objects. Alan has come up with some improvements to migtigate the sitution to the point where even the M3 RTS only has one object for bss and it's managed memory (when running CVSUP.) (There are still cases where the situation isn't improved when the system pages -- but this is much much better for the vast majority of cases.) The system will now be able to much more effectively merge map entries. Submitted by: Alan Cox <alc@cs.rice.edu> Notes: svn path=/head/; revision=21134
* Let the VM system know that on certain arch's that VM_PROT_READJohn Dyson1996-12-301-1/+13
| | | | | | | | | | | | | | | | | also implies VM_PROT_EXEC. We support it that way for now, since the break system call by default gives VM_PROT_ALL. Now we have a better chance of coalesing map entries when mixing mmap/break type operations. This was contributing to excessive numbers of map entries on the modula-3 runtime system. The problem is still not "solved", but the situation makes more sense. Eventually, when we work on architectures where VM_PROT_READ is orthogonal to VM_PROT_EXEC, we will have to visit this issue carefully (esp. regarding security issues.) Notes: svn path=/head/; revision=21039
* EEEK!!! useracc and kernacc didn't lock their respectiveJohn Dyson1996-12-301-2/+16
| | | | | | | | | | maps. Additionally, eliminate the map->hint distortion associated with useracc. That may/may-not be the "right" thing to do -- but time will tell. Submitted by: Partially by Alan Cox <alc@cs.rice.edu> Notes: svn path=/head/; revision=21037
* Superficial cleanup of comment.John Dyson1996-12-291-2/+2
| | | | Notes: svn path=/head/; revision=20999
* Eliminate the redundancy due to the similarity between the routinesJohn Dyson1996-12-283-84/+18
| | | | | | | | | | vm_map_simplify and vm_map_simplify_entry. Make vm_map_simplify_entry handle wired maps so that we can get rid of vm_map_simplify. Modify the callers of vm_map_simplify to properly use vm_map_simplify_entry. Submitted by: Alan Cox <alc@cs.rice.edu> Notes: svn path=/head/; revision=20993
* The code unnecessarily created an object with no handle up-front, whichJohn Dyson1996-12-281-5/+10
| | | | | | | | | has the negative effect of disabling some map optimizations. This patch defers the creation of the object until it needs to be at fault time. Submitted by: Alan Cox <alc@cs.rice.edu> Notes: svn path=/head/; revision=20991
* Make DFLDSIZ and MAXDSIZ fully-supported options.Joerg Wunsch1996-12-222-2/+6
| | | | | | | "Don't forget to do a ``make depend''" :-) Notes: svn path=/head/; revision=20821
* Implement closer-to POSIX mlock semantics. The major difference isJohn Dyson1996-12-145-9/+217
| | | | | | | | | | | | | that we do allow mlock to span unallocated regions (of course, not mlocking them.) We also allow mlocking of RO regions (which the old code couldn't.) The restriction there is that once a RO region is wired (mlocked), it cannot be debugged (or EVER written to.) Under normal usage, the new mlock code will be a significant improvement over our old stuff. Notes: svn path=/head/; revision=20449
* Expunge inlines...John Dyson1996-12-071-4/+4
| | | | Notes: svn path=/head/; revision=20189
* Fix a map entry leak problem found by DG. Also, de-inline a functionJohn Dyson1996-12-071-3/+5
| | | | | | | vm_map_entry_dispose, because it won't help being inlined. Notes: svn path=/head/; revision=20187
* Make vm_map_insert much more intelligent in the MAP_NOFAULT case soJohn Dyson1996-12-072-7/+29
| | | | | | | | | | | | that map entries are coalesced when appropriate. Also, conditionalize some code that is currently not used in vm_map_insert. This mod has been added to eliminate unnecessary map entries in buffer map. Additionally, there were some cases where map coalescing could be done when it shouldn't. That problem has been resolved. Notes: svn path=/head/; revision=20182
* Implement a new totally dynamic (up to MAXPHYS) buffer kva allocationJohn Dyson1996-11-304-25/+37
| | | | | | | | | | | | | | | | | | scheme. Additionally, add the capability for checking for unexpected kernel page faults. The maximum amount of kva space for buffers hasn't been decreased from where it is, but it will now be possible to do so. This scheme manages the kva space similar to the buffers themselves. If there isn't enough kva space because of usage or fragementation, buffers will be reclaimed until a buffer allocation is successful. This scheme should be very resistant to fragmentation problems until/if the LFS code is fixed and uses the bogus buffer locking scheme -- but a 'fixed' LFS is not likely to use such a scheme. Now there should be NO problem allocating buffers up to MAXPHYS. Notes: svn path=/head/; revision=20054
* Make the kernel smaller with at worst a neutral effect on perf byJohn Dyson1996-11-283-34/+34
| | | | | | | de-inlining some VM calls. (Actually, I measured a small improvement.) Notes: svn path=/head/; revision=20007
* Improve the locality of reference for variables in vm_page andJohn Dyson1996-11-172-27/+27
| | | | | | | | vm_kern by moving them from .bss to .data. With this change, there is a measurable perf improvement in fork/exec. Notes: svn path=/head/; revision=19830
* Vastly improved contigmalloc routine. It does not solve theJohn Dyson1996-11-051-63/+153
| | | | | | | | | | | | problem of allocating contiguous buffer memory in general, but make it much more likely to work at boot-up time. The best chance for an LKM-type load of a sound driver is immediately after the mount of the root filesystem. This appears to work for a 64K allocation on an 8MB system. Notes: svn path=/head/; revision=19415
* Change mmap to use OBJT_DEFAULT instead of OBJT_SWAP by defaultJohn Dyson1996-10-291-2/+2
| | | | | | | | for anonymous objects. The system will automatically change the type to SWAP if needed (for size or pageout reasons.) Notes: svn path=/head/; revision=19259
* The way we get a vnode for swapdev is not quite kosher. In particularPoul-Henning Kamp1996-10-271-4/+18
| | | | | | | | | it breaks in the DEVFS_ROOT case. replicate a bit too much of bdevvp() in here to circumvent the problem. The real problem is the magic that lives in bdevsw[1]. Notes: svn path=/head/; revision=19216
* Remove a bogus optimization in the mmap code. It is superfluous,John Dyson1996-10-241-24/+5
| | | | | | | | and at best is the same speed as the unoptimized code. At worst, it slows down trivial programs. Notes: svn path=/head/; revision=19142
* Make processes waken up eligible for immediate swap-in.John Dyson1996-10-171-3/+8
| | | | Notes: svn path=/head/; revision=18974
* Clean up the rundown of the object backing a vnode. This should fixJohn Dyson1996-10-172-2/+9
| | | | | | | NFS problems associated with forcible dismounts. Notes: svn path=/head/; revision=18973
* Removed nested include of <sys/proc.h> from <vm/vm_object.h> and fixedBruce Evans1996-10-151-4/+2
| | | | | | | | | | | | | the one place that depended on it. wakeup() is now prototyped in <sys/systm.h> so that it is normally visible. Added nested include of <sys/queue.h> in <vm/vm_object.h>. The queue macros are a more fundamental prerequisite for <vm/vm_object.h> than the wakeup prototype and previously happened to be included by namespace pollution from <sys/proc.h> or elsewhere. Notes: svn path=/head/; revision=18942
* Move much of the machine dependent code from vm_glue.c intoJohn Dyson1996-10-153-110/+12
| | | | | | | | pmap.c. Along with the improved organization, small proc fork performance is now about 5%-10% faster. Notes: svn path=/head/; revision=18937
* Remove a stale comment.Poul-Henning Kamp1996-10-131-2/+1
| | | | Notes: svn path=/head/; revision=18908
* Removed __pure's and __pure2's. __pure is a no-op for recent versionsBruce Evans1996-10-122-10/+7
| | | | | | | | of gcc by definition, and __pure2 is a no-op in effect (presumably the compiler can see when an inline function has no side effects). Notes: svn path=/head/; revision=18893
* Make the default cache size optim to be 256K, the old default wasJohn Dyson1996-10-061-9/+10
| | | | | | | | | 64K. The change has essentially neutral effect on those machines with little or no cache, and has a positive effect on "normal" machines with 256K or more cache. Notes: svn path=/head/; revision=18779
* Fix a problem with the page coloring code that the system will not alwaysJohn Dyson1996-10-061-3/+7
| | | | | | | | be able to use all of the free pages. This can manifest as a panic using DIAGNOSTIC, or as a panic on an indirect memory reference. Notes: svn path=/head/; revision=18768
* Fixed undeclared variables for the !(PQ_L2_SIZE > 1) case.Bruce Evans1996-09-281-4/+3
| | | | | | | Removed redundant #include. Notes: svn path=/head/; revision=18542
* Reviewed by:John Dyson1996-09-284-84/+111
| | | | | | | | Submitted by: Obtained from: Notes: svn path=/head/; revision=18526
* Fixed bug with reversed trunc/round_page() in madvise...start must beDavid Greenman1996-09-191-3/+3
| | | | | | | trunced, end must be rounded. Notes: svn path=/head/; revision=18389
* Removed iprintf(). It was copied to db_iprintf() in ddb.Bruce Evans1996-09-152-40/+2
| | | | Notes: svn path=/head/; revision=18307
* Attached vm ddb commands `show map', `show vmochk', `show object',Bruce Evans1996-09-144-105/+113
| | | | | | | | | | | | | | | | | | | | `show vmopag', `show page' and `show pageq'. Moved all vm ddb stuff to the ends of the vm source files. Changed printf() to db_printf(), `indent' to db_indent, and iprintf() to db_iprintf() in ddb commands. Moved db_indent and db_iprintf() from vm to ddb. vm_page.c: Don't use __pure. Staticized. db_output.c: Reduced page width from 80 to 79 to inhibit double spacing for long lines (there are still some problems if words are printed across column 79). Notes: svn path=/head/; revision=18298
* The whole issue of not support VOP_LOCK for VBLK devices should beJohn Dyson1996-09-101-3/+10
| | | | | | | | | rethought. This fixes YET another problem with unmounting filesystems. The root cause is not fixed here, but at least the problem has gone away. Notes: svn path=/head/; revision=18205
* Fixed the use of the wrong variable in vm_map_madvise.John Dyson1996-09-081-4/+4
| | | | Notes: svn path=/head/; revision=18178