summaryrefslogtreecommitdiffstats
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Properly set the PG_MAPPED and PG_WRITEABLE flags. This fixes some potentialdyson1996-07-023-6/+7
| | | | problems with vm_map_remove/vm_map_delete.
* Make -current consistant with -stable regarding time that a processdyson1996-06-301-2/+2
| | | | | | sleeps before being swapped out. The time is increased from 4 secs to 10 secs. Originally I had decreased it from 20 to 4, but that is a bit severe. 20 is too long though.
* Make sure we have an object in the map entry before trying to trim pagesdg1996-06-291-2/+3
| | | | from it.
* This commit does a couple of things:dyson1996-06-264-136/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-enables the RSS limiting, and the routine is now tail-recursive, making it much more safe (eliminates the possiblity of kernel stack overflow.) Also, the RSS limiting is a little more intelligent about finding the likely objects that are pushing the process over the limit. Added some sysctls that help with VM system tuning. New sysctl features: 1) Enable/disable lru pageout algorithm. vm.pageout_algorithm = 0, default algorithm that works well, especially using X windows and heavy memory loading. Can have adverse effects, sometimes slowing down program loading. vm.pageout_algorithm = 1, close to true LRU. Works much better than clock, etc. Does not work as well as the default algorithm in general. Certain memory "malloc" type benchmarks work a little better with this setting. Please give me feedback on the performance results associated with these. 2) Enable/disable swapping. vm.swapping_enabled = 1, default. vm.swapping_enabled = 0, useful for cases where swapping degrades performance. The config option "NO_SWAPPING" is still operative, and takes precedence over the sysctl. If "NO_SWAPPING" is specified, the sysctl still exists, but "vm.swapping_enabled" is hard-wired to "0". Each of these can be changed "on the fly."
* Fix some serious problems with limits checking in the sbrk(2)/brk(2)dyson1996-06-251-13/+25
| | | | | code. Reviewed by: bde
* Remove RSS limiting until I rewrite the code to be non-recursive. Thedyson1996-06-241-9/+5
| | | | code can overrun the kernel stack under very stressful conditions.
* Improve algorithm for page hash queue. It was previously aboutdyson1996-06-211-2/+2
| | | | | as bad as it could be. This algorithm appears to improve fork performance (barely) measurably.
* Several bugfixes/improvements:dyson1996-06-173-37/+52
| | | | | | | | | | | | | | | | | | | | 1) Make it much less likely to miss a wakeup in vm_page_free_wakeup 2) Create a new entry point into pmap: pmap_ts_referenced, eliminates the need to scan the pv lists twice in many cases. Perhaps there is alot more to do here to work on minimizing pv list manipulation 3) Minor improvements to vm_pageout including the use of pmap_ts_ref. 4) Major changes and code improvement to pmap. This code has had several serious bugs in page table page manipulation. In order to simplify the problem, and hopefully solve it for once and all, page table pages are no longer "managed" with the pv list stuff. Page table pages are only (mapped and held/wired) or (free and unused) now. Page table pages are never inactive, active or cached. These changes have probably fixed the hold count problems, but if they haven't, then the code is simpler anyway for future bugfixing. 5) The pmap code has been sorely in need of re-organization, and I have taken a first (of probably many) steps. Please tell me if you have any ideas.
* Various bugfixes/cleanups from me and others:dyson1996-06-166-90/+66
| | | | | | | | | | | | 1) Remove potential race conditions on waking up in vm_page_free_wakeup by making sure that it is at splvm(). 2) Fix another bug in vm_map_simplify_entry. 3) Be more complete about converting from default to swap pager when an object grows to be large enough that there can be a problem with data structure allocation under low memory conditions. 4) Make some madvise code more efficient. 5) Added some comments.
* Move a case of PG_MAPPED being set before a pmap_enter(). This will likelydg1996-06-141-2/+2
| | | | | make no difference, but it will make it consistent with other uses of PG_MAPPED.
* Fix a very significant cnt.v_wire_count leak in vm_page.c, and somedyson1996-06-121-1/+2
| | | | minor leaks in pmap.c. Bruce Evans made me aware of this problem.
* Fix some serious errors in vm_map_simplify_entries.dyson1996-06-121-6/+7
|
* Mostly superficial code improvements, add a diagnostic. Thedyson1996-06-101-18/+23
| | | | | | code improvements include significant simplification of the reservation of the swap pager control blocks for reads. Add a panic for an inconsistent swap pager control block count.
* Keep the vm_fault/vm_pageout from getting into an "infinite paging loop", bydyson1996-06-101-3/+7
| | | | | | reserving "cached" pages before waking up the pageout daemon. This will reserve the faulted page, and keep the system from thrashing itself to death given this condition.
* Adjust the threshold for blocking on movement of pages from the cachedyson1996-06-083-9/+8
| | | | | | | | | | | | | | | | | queue in vm_fault. Move the PG_BUSY in vm_fault to the correct place. Remove redundant/unnecessary code in pmap.c. Properly block on rundown of page table pages, if they are busy. I think that the VM system is in pretty good shape now, and the following individuals (among others, in no particular order) have helped with this recent bunch of bugs, thanks! If I left anyone out, I apologize! Stephen McKay, Stephen Hocking, Eric J. Chet, Dan O'Brien, James Raynard, Marc Fournier.
* Keep page-table pages from ever being sensed as dirty. This should fixdyson1996-06-052-72/+139
| | | | | | | some problems with the page-table page management code, since it can't deal with the notion of page-table pages being paged out or in transit. Also, clean up some stylistic issues per some suggestions from Stephen McKay.
* Disable madvise optimizations for device pager objects (some of thedyson1996-06-011-6/+9
| | | | | | | operations don't work with FICTITIOUS pages.) Also, close a window between PG_MANAGED and pmap_enter that can mess up the accounting of the managed flag. This problem could likely cause a hold_count error for page table pages.
* This commit is dual-purpose, to fix more of the pageout daemondyson1996-05-318-58/+101
| | | | | | queue corruption problems, and to apply Gary Palmer's code cleanups. David Greenman helped with these problems also. There is still a hang problem using X in small memory machines.
* Correct some unfortunately chosen constants, otherwise, not enoughdyson1996-05-291-4/+3
| | | | | pages are calculated for deferred allocation of swap pager data structures. This is a follow-on to the previous commit to this file.
* After careful review by David Greenman and myself, David had found adyson1996-05-291-59/+94
| | | | | | case where blocking can occur, thereby giving other process's a chance to modify the queue where a page resides. This could cause numerous process and system failures.
* Make sure that pageout deadlocks cannot occur. There is a problemdyson1996-05-292-9/+33
| | | | | | | | | that the datastructures needed to support the swap pager can take enough space to fully deplete system memory, and cause a deadlock. This change keeps large objects from being filled with dirty pages without the appropriate swap pager datastructures. Right now, default objects greater than 1/4 the size of available system memory are converted to swap objects, thereby eliminating the risk of deadlock.
* Fix a couple of problems in the pageout_scan routine. First, there isdyson1996-05-261-3/+17
| | | | | | | | | a condition when blocking can occur, and the daemon did not check properly for a page remaining on the expected queue. Additionally, the inactive target was being set much too large for small memory machines. It is now being calculated based upon the amount of user memory available on every pageout daemon run. Another problem was that if memory was very low, the pageout daemon could fail repeatedly to traverse the inactive queue.
* I think this covers (fixes) the last batch of freeing active/held/busy pagedyson1996-05-261-1/+3
| | | | | | problem. BY MISTAKE, the vm_page_unqueue (or equiv) was removed from the vm_fault code. Really bad things appear to happen if a page is on a queue while it is being faulted.
* Add an assert to vm_page_cache. We should never cache a dirty page.dyson1996-05-241-1/+4
|
* Add apparently needed splvm protection to the active queue, and eliminatedyson1996-05-241-2/+9
| | | | an unnecessary test for dirty pages if it is already known to be dirty.
* Eliminate inefficient check for dirty pages for pages in the PQ_CACHEdyson1996-05-241-1/+14
| | | | | queue. Also, modify the MADV_FREE policy (it probably still isn't the final version.)
OpenPOWER on IntegriCloud