summaryrefslogtreecommitdiffstats
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* 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.)
* Make the conversion from the default pager to swap pager more robustdyson1996-05-241-5/+7
| | | | in the face of low memory conditions.
* Eliminate a vm_page_free, busy panic, in kern_malloc.dyson1996-05-231-1/+2
|
* Initial support for MADV_FREE, support for pages that we don't caredyson1996-05-234-59/+43
| | | | | | about the contents anymore. This gives us alot of the advantage of freeing individual pages through munmap, but with almost none of the overhead.
* After reviewing the previous commit to vm_object, the page protectiondyson1996-05-211-3/+1
| | | | is never necessary, not just for PG_FICTICIOUS.
* Don't protect non-managed pages off during object rundown. This fixesdyson1996-05-211-2/+3
| | | | a hang that occurs under certain circumstances when exiting X.
* Initial support for mincore and madvise. Both are almost fullydyson1996-05-197-25/+387
| | | | | supported, except madvise does not page in with MADV_WILLNEED, and MADV_DONTNEED doesn't force dirty pages out.
* One more file missing from the mega-commit. This inlines some verydyson1996-05-181-4/+32
| | | | | simple routines in vm_page.c, so that an unnecessary subroutine call is removed.
* File mistakenly left out of the previous mega-commit. This providesdyson1996-05-181-1/+2
| | | | a global defn for 'exech_map.'
* This set of commits to the VM system does the following, and containdyson1996-05-1812-594/+474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contributions or ideas from Stephen McKay <syssgm@devetir.qld.gov.au>, Alan Cox <alc@cs.rice.edu>, David Greenman <davidg@freebsd.org> and me: More usage of the TAILQ macros. Additional minor fix to queue.h. Performance enhancements to the pageout daemon. Addition of a wait in the case that the pageout daemon has to run immediately. Slightly modify the pageout algorithm. Significant revamp of the pmap/fork code: 1) PTE's and UPAGES's are NO LONGER in the process's map. 2) PTE's and UPAGES's reside in their own objects. 3) TOTAL elimination of recursive page table pagefaults. 4) The page directory now resides in the PTE object. 5) Implemented pmap_copy, thereby speeding up fork time. 6) Changed the pv entries so that the head is a pointer and not an entire entry. 7) Significant cleanup of pmap_protect, and pmap_remove. 8) Removed significant amounts of machine dependent fork code from vm_glue. Pushed much of that code into the machine dependent pmap module. 9) Support more completely the reuse of already zeroed pages (Page table pages and page directories) as being already zeroed. Performance and code cleanups in vm_map: 1) Improved and simplified allocation of map entries. 2) Improved vm_map_copy code. 3) Corrected some minor problems in the simplify code. Implemented splvm (combo of splbio and splimp.) The VM code now seldom uses splhigh. Improved the speed of and simplified kmem_malloc. Minor mod to vm_fault to avoid using pre-zeroed pages in the case of objects with backing objects along with the already existant condition of having a vnode. (If there is a backing object, there will likely be a COW... With a COW, it isn't necessary to start with a pre-zeroed page.) Minor reorg of source to perhaps improve locality of ref.
* Allocate mbufs from a separate submap so that NMBCLUSTERS works aswollman1996-05-102-5/+15
| | | | expected.
* Another sweep over the pmap/vm macros, this time with more focus onphk1996-05-036-18/+17
| | | | | the usage. I'm not satisfied with the naming, but now at least there is less bogus stuff around.
* removed:phk1996-05-021-2/+2
| | | | | | | | | CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei() ptei() kvtopte() ptetov() ispt() ptetoav() &c &c new: NPDEPG Major macro cleanup.
* KGDB is dead. It may come back one day if somebody does it.phk1996-05-022-23/+2
|
* Move the map entry allocations from the kmem_map to the kernel_map. Asdyson1996-04-291-4/+4
| | | | a side effect, correct the associated object offset.
* This fixes kmem_malloc/kmem_free (and malloc/free of objects of > 8K).dyson1996-04-242-8/+11
| | | | | A page index was calculated incorrectly in vm_kern, and vm_object_page_remove removed pages that should not have been.
* Fixed a spl hog. The vmdaemon process ran entirely at splhigh. Itbde1996-04-111-1/+3
| | | | | | | sometimes disabled clock interrupts for 60 msec or more on a P133. Clock interrupts were lost ... Reviewed by: dyson
* Reinstitute the map lock for processes being swapped out. Thisdyson1996-04-091-1/+18
| | | | | | is needed because of the vm_fault used to bring the page table page for the kernel stack (UPAGES) back in. The consequence of the previous incorrect change was a system hang.
* Map lock checks not needed anymore for swapping out. We don't usedyson1996-04-081-12/+2
| | | | | map operations for it anymore. Certain deadlocks should never happen anymore.
* Removed never-used #includes of <machine/cpu.h>. Many were apparentlybde1996-04-071-2/+1
| | | | copied from bad examples.
* Fixed a problem that the UPAGES of a process were being run downdyson1996-04-032-14/+44
| | | | | | | in a suboptimal manner. I had also noticed some panics that appeared to be at least superficially caused by this problem. Also, included are some minor mods to support more general handling of page table page faulting. More details in a future commit.
* Revert to previous calculation of vm_object_cache_max: it simply worksdg1996-03-291-2/+2
| | | | better in most real-world cases.
* Undid last revision. It duplicated part of second last revision.bde1996-03-281-5/+1
|
* devfs_add_devsw() -> devfs_add_devswf modificationsscrappy1996-03-281-1/+5
| | | | Reviewed by: julian@freebsd.org
* Add a function prototype for pmap_prefault.dyson1996-03-281-1/+3
|
* VM performance improvements, and reorder some operations in VM faultdyson1996-03-285-110/+124
| | | | | in anticipation of a fix in pmap that will allow the mlock system call to work without panicing the system.
* More map_simplify fixes from Alan Cox. This very significanly improves thedyson1996-03-281-29/+28
| | | | | | | performance when the map has been chopped up. The map simplify operations really work now. Reviewed by: dyson Submitted by: Alan Cox <alc@cs.rice.edu>
* Added drum device.bde1996-03-271-1/+12
| | | | Submitted by: partly by "Marc G. Fournier" <scrappy@ki.net>
* Fix the problem that unmounting filesystems that are backed by a VMIOdyson1996-03-191-2/+5
| | | | | | | device have reference count problems. We mark the underlying object ono-persistent, and account for the reference count that the VM system maintainsfor the special device close. This should fix the removable device problem.
* Force device mappings to always be shared. It doesn't make sense for themdg1996-03-161-4/+5
| | | | | | | to ever be COW and we need the mappings to be shared for backward compatibilty. Reviewed by: dyson
* This commit is as a result of a comment by Alan Cox (alc@cs.rice.edu)dyson1996-03-131-36/+53
| | | | | | | | regarding the "real" problem with maps that we have been having over the last few weeks. He noted that the first_free pointer was left dangling in certain circumstances -- and he was right!!! This should fix the map problems that we were having, and also give us the advantage of being able to simplify maps more aggressively.
* Fix the map corruption problem that appears as a u_map allocationdyson1996-03-121-25/+3
| | | | error.
* Allow mmap'ed devices to work correctly across forks. The sanestdyson1996-03-121-3/+11
| | | | | solution appeared to be to allow the child to maintain the same mapping as the parent.
* For Lite2: proc LIST changes.hsu1996-03-114-11/+11
| | | | Reviewed by: davidg & bde
* Delay forking a process until there are more pages available. It wasdyson1996-03-091-2/+2
| | | | possible to deadlock with the low threshold that we had used.
OpenPOWER on IntegriCloud