summaryrefslogtreecommitdiffstats
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* Undo the collapse breakage (swap space usage problem.)dyson1997-01-034-16/+4
|
* Guess what? We left alot of the old collapse code that is not neededdyson1997-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.
* A very significant improvement in the management of process mapsdyson1996-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>
* Let the VM system know that on certain arch's that VM_PROT_READdyson1996-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.)
* EEEK!!! useracc and kernacc didn't lock their respectivedyson1996-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>
* Superficial cleanup of comment.dyson1996-12-291-2/+2
|
* Eliminate the redundancy due to the similarity between the routinesdyson1996-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>
* The code unnecessarily created an object with no handle up-front, whichdyson1996-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>
* Make DFLDSIZ and MAXDSIZ fully-supported options.joerg1996-12-222-2/+6
| | | | "Don't forget to do a ``make depend''" :-)
* Implement closer-to POSIX mlock semantics. The major difference isdyson1996-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.
* Expunge inlines...dyson1996-12-071-4/+4
|
* Fix a map entry leak problem found by DG. Also, de-inline a functiondyson1996-12-071-3/+5
| | | | vm_map_entry_dispose, because it won't help being inlined.
* Make vm_map_insert much more intelligent in the MAP_NOFAULT case sodyson1996-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.
* Implement a new totally dynamic (up to MAXPHYS) buffer kva allocationdyson1996-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.
* Make the kernel smaller with at worst a neutral effect on perf bydyson1996-11-283-34/+34
| | | | de-inlining some VM calls. (Actually, I measured a small improvement.)
* Improve the locality of reference for variables in vm_page anddyson1996-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.
* Vastly improved contigmalloc routine. It does not solve thedyson1996-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.
* Change mmap to use OBJT_DEFAULT instead of OBJT_SWAP by defaultdyson1996-10-291-2/+2
| | | | | for anonymous objects. The system will automatically change the type to SWAP if needed (for size or pageout reasons.)
* The way we get a vnode for swapdev is not quite kosher. In particularphk1996-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].
* Remove a bogus optimization in the mmap code. It is superfluous,dyson1996-10-241-24/+5
| | | | | and at best is the same speed as the unoptimized code. At worst, it slows down trivial programs.
* Make processes waken up eligible for immediate swap-in.dyson1996-10-171-3/+8
|
* Clean up the rundown of the object backing a vnode. This should fixdyson1996-10-172-2/+9
| | | | NFS problems associated with forcible dismounts.
* Removed nested include of <sys/proc.h> from <vm/vm_object.h> and fixedbde1996-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.
* Move much of the machine dependent code from vm_glue.c intodyson1996-10-153-110/+12
| | | | | pmap.c. Along with the improved organization, small proc fork performance is now about 5%-10% faster.
* Remove a stale comment.phk1996-10-131-2/+1
|
* Removed __pure's and __pure2's. __pure is a no-op for recent versionsbde1996-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).
* Make the default cache size optim to be 256K, the old default wasdyson1996-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.
* Fix a problem with the page coloring code that the system will not alwaysdyson1996-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.
* Fixed undeclared variables for the !(PQ_L2_SIZE > 1) case.bde1996-09-281-4/+3
| | | | Removed redundant #include.
* Reviewed by:dyson1996-09-284-84/+111
| | | | | Submitted by: Obtained from:
* Fixed bug with reversed trunc/round_page() in madvise...start must bedg1996-09-191-3/+3
| | | | trunced, end must be rounded.
* Removed iprintf(). It was copied to db_iprintf() in ddb.bde1996-09-152-40/+2
|
* Attached vm ddb commands `show map', `show vmochk', `show object',bde1996-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).
* The whole issue of not support VOP_LOCK for VBLK devices should bedyson1996-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.
* Fixed the use of the wrong variable in vm_map_madvise.dyson1996-09-081-4/+4
|
* Addition of page coloring support. Various levels of coloring are afforded.dyson1996-09-0810-109/+441
| | | | | | The default level works with minimal overhead, but one can also enable full, efficient use of a 512K cache. (Parameters can be generated to support arbitrary cache sizes also.)
* Improve the scalability of certain pmap operations.dyson1996-09-081-2/+1
|
* Even though this looks like it, this is not a complex code change.dyson1996-08-213-7/+14
| | | | | | | | | | | | | | | | | The interface into the "VMIO" system has changed to be more consistant and robust. Essentially, it is now no longer necessary to call vn_open to get merged VM/Buffer cache operation, and exceptional conditions such as merged operation of VBLK devices is simpler and more correct. This code corrects a potentially large set of problems including the problems with ktrace output and loaded systems, file create/deletes, etc. Most of the changes to NFS are cosmetic and name changes, eliminating a layer of subroutine calls. The direct calls to vput/vrele have been re-instituted for better cross platform compatibility. Reviewed by: davidg
* Backed out the recent changes/enhancements to the VM code. Thedyson1996-07-3011-362/+207
| | | | | | | problem with the 'shell scripts' was found, but there was a 'strange' problem found with a 486 laptop that we could not find. This commit backs the code back to 25-jul, and will be re-entered after the snapshot in smaller (more easily tested) chunks.
* Slight performance tweak for previous commit.dg1996-07-281-2/+3
|
* Undo part of the scalability commit. Many of the changesdyson1996-07-281-29/+15
| | | | | in vm_fault had some performance enhancements not ready for prime time. This commit backs out some of the changes.
* Allow sequentially created mmap'ed anonymous regions to coalesce. Theredyson1996-07-271-23/+33
| | | | | | is little or no reason to create a swap pager for small mmap's. The vm_map_insert code will automatically create a swap pager if the object becomes too large. This fix, per a request from phk.
* Clean up some lint.dyson1996-07-271-3/+3
|
* Remove experimental header file. My test-build must have picked itdyson1996-07-271-1/+3
| | | | | up in an unexpected place. Submitted by: jkh
* Missing (prototype) change from the previous commit.dyson1996-07-271-2/+2
|
* This commit is meant to solve a couple of VM system problems ordyson1996-07-2710-209/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | performance issues. 1) The pmap module has had too many inlines, and so the object file is simply bigger than it needs to be. Some common code is also merged into subroutines. 2) Removal of some *evil* PHYS_TO_VM_PAGE macro calls. Unfortunately, a few have needed to be added also. The removal caused the need for more vm_page_lookups. I added lookup hints to minimize the need for the page table lookup operations. 3) Removal of some bogus performance improvements, that mostly made the code more complex (tracking individual page table page updates unnecessarily). Those improvements actually hurt 386 processors perf (not that people who worry about perf use 386 processors anymore :-)). 4) Changed pv queue manipulations/structures to be TAILQ's. 5) The pv queue code has had some performance problems since day one. Some significant scalability issues are resolved by threading the pv entries from the pmap AND the physical address instead of just the physical address. This makes certain pmap operations run much faster. This does not affect most micro-benchmarks, but should help loaded system performance *significantly*. DG helped and came up with most of the solution for this one. 6) Most if not all pmap bit operations follow the pattern: pmap_test_bit(); pmap_clear_bit(); That made for twice the necessary pv list traversal. The pmap interface now supports only pmap_tc_bit type operations: pmap_[test/clear]_modified, pmap_[test/clear]_referenced. Additionally, the modified routine now takes a vm_page_t arg instead of a phys address. This eliminates a PHYS_TO_VM_PAGE operation. 7) Several rewrites of routines that contain redundant code to use common routines, so that there is a greater likelihood of keeping the cache footprint smaller.
* Don't use NULL in non-pointer contexts.bde1996-07-121-2/+2
|
* Back-off on the previous commit, specifically remove the look-aheaddyson1996-07-081-11/+3
| | | | optimization on the active queue scan. I will do this correctly later.
* Fix a problem with the pageout daemon RSS limiting, where it degradesdyson1996-07-081-21/+27
| | | | | | | performance to LRU or worse when RSS limiting takes effect. Also, make an end condition in the active queue scan more efficient in the case where pages are removed from the active queue as a side effect of a pmap operation.
* In all special cases for spl or page_alloc where kmem_map is check for,dg1996-07-071-8/+8
| | | | | mb_map (a submap of kmem_map) must also be checked. Thanks to wcarchive (err...sort of) for demonstrating this bug.
OpenPOWER on IntegriCloud