summaryrefslogtreecommitdiff
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug that could lead to pmap corruption during asynchronous pageDavid Greenman1996-11-242-6/+6
| | | | | | | | | cleans and then cause a panic or worse. Submitted by: dyson and wcarchive Notes: svn path=/stable/2.1/; revision=19943
* In vm_page_alloc_contig(), round "size" up to the next page boundry. NotDavid Greenman1996-10-241-1/+2
| | | | | | | | | | | doing so breaks the looping and bad things will happen. This was exposed when testing some (aha2940) fixes from Justin that didn't work because of this. This fix is relevant only to -stable since -current already has the equivilent in the contigmalloc() routine. Notes: svn path=/stable/2.1/; revision=19145
* Applied changes similar to rev 1.52: treat kmem_map and mb_map equallyDavid Greenman1996-07-071-8/+8
| | | | | | | in special cases. Notes: svn path=/stable/2.1/; revision=16994
* From main branch: Kill a bogus VM_WAIT in vm_fault_wire() that may haveDavid Greenman1996-07-021-6/+1
| | | | | | | | | undesired effects. Submitted by: dyson Notes: svn path=/stable/2.1/; revision=16896
* Fixed rather serious bug in the use of pmap_kenter() in kmem_malloc().David Greenman1996-07-011-2/+4
| | | | | | | | | | | | | | It's important that pmap_enter() be used here because the pages won't be removed from the kernel VM when freed otherwise. This would result in the potential for the wrong page(s) being used if a vm_map_pageable() was done on this same address space (since no fault would occur, the previous page(s) would be bogusly used instead). This is almost certainly yet another cause of wcarchive instabilities. Thanks to John Dyson for helping me track this one down! Notes: svn path=/stable/2.1/; revision=16870
* Make sure we have an object in the map entry before trying to trim pagesDavid Greenman1996-06-291-2/+3
| | | | | | | from it. Notes: svn path=/stable/2.1/; revision=16834
* Add another check to vm_pageout_clean: make sure the page isn't wired.David Greenman1996-06-271-2/+2
| | | | Notes: svn path=/stable/2.1/; revision=16803
* Correct a minor ommision: I left out a vput() when unwinding an exceptionalDavid Greenman1996-06-271-3/+12
| | | | | | | | | | | condition. Also, it's possible that we might not be dealing with the same page if the vget() should block but still succeed (this is possible), so be sure to check to see that the page is still dirty and on the PG_INACTIVE queue. Checks in vm_pageout_clean() will guarantee that the page is still a condidate for pageout (busy, hold, PG_BUSY, etc). Notes: svn path=/stable/2.1/; revision=16802
* Increased slptime threshold for swapout from 4 seconds to 10. The oldDavid Greenman1996-06-271-2/+2
| | | | | | | value was far too aggressive. Notes: svn path=/stable/2.1/; revision=16795
* Retrofitted the non-recursive RSS limiting code from main branch. DueDavid Greenman1996-06-271-129/+111
| | | | | | | | | | | | | to the major differences in the VM systems in current and stable, this retrofit does have some significant algorithmic differences. In any case, it should be superior to the old (recursive) algorithm in every way. This, along with the vm_glue.c fix, should fix all of the recent paging performance complaints. Reviewed by: dyson Notes: svn path=/stable/2.1/; revision=16794
* pmap_remove() the upages when swapping out the process. Not doing soDavid Greenman1996-06-271-1/+4
| | | | | | | | | | will cause the pages to never be cleanablei - leading to a pageout daemon loop. Reviewed by: dyson Notes: svn path=/stable/2.1/; revision=16792
* Fix the immediate problem: add missing arg to freeer() routine. The lastDavid Greenman1996-06-261-3/+3
| | | | | | | | | | few edits to this still don't solve the original problem. It appears that the recursion is *much* worse than we thought - I'm already testing at 30 levels deep, and it still terminates before finishing the job. This problaby explains some people's stack overflow problems... :-( Notes: svn path=/stable/2.1/; revision=16765
* 1) Limit recursion when duing RSS trimming.David Greenman1996-06-261-27/+22
| | | | | | | | | | 2) Fix a bug that caused the page stats to get messed up. 3) Re-enabled RSS limiting. Submitted by: mostly by John Dyson Notes: svn path=/stable/2.1/; revision=16759
* Retrofitted fix from rev 1.11: rewrite of obreak().David Greenman1996-06-251-15/+27
| | | | Notes: svn path=/stable/2.1/; revision=16687
* Fixed several serious bugs that had to do with traversing the pageDavid Greenman1996-06-191-39/+8
| | | | | | | | | | | | | queues and inadvertantly stepping off the queue via a page that was previous removed from it. Also killed the potentially evil RSS limiting code in the vmdaemon - it traverses allproc which would not be consistent if the code should block for some reason (it shouldn't block, but we're not completely sure of that...). Submitted by: dyson Notes: svn path=/stable/2.1/; revision=16503
* Add m->hold_count != 0 to the list of exceptions for not putting a pageDavid Greenman1996-06-191-2/+2
| | | | | | | | | | on the cache queue. The previous behavior might have allowed a page to get on the cache queue that shouldn't have been. Reviewed by: dyson Notes: svn path=/stable/2.1/; revision=16502
* Make certain that pages (especially cached pages) are pulled off theDavid Greenman1996-06-191-2/+7
| | | | | | | | | | page queue immediately so that they aren't used by something else before we get to them. Submitted by: dyson Notes: svn path=/stable/2.1/; revision=16501
* vm_map_entry_dispose() needs splimp protection, too, so add it.David Greenman1996-06-151-1/+5
| | | | Notes: svn path=/stable/2.1/; revision=16386
* Protect map entry allocations with splimp. This is necessary since mallocDavid Greenman1996-06-151-15/+11
| | | | | | | | | | | | can/will allocate map entries at interrupt time. This is similar to a (splvm) change that was made in the main branch, but much simpler. The code in the main branch is broken (the thresholds are of such that freed map entries will accumulate on the non-kernel pool)...so the fix was re-implemented with just the spl protection and minor algorithmic simplification. Notes: svn path=/stable/2.1/; revision=16384
* Added splbio() protection to active and inactive page queue manipulations.David Greenman1996-06-151-3/+15
| | | | | | | | | This is similar to the splvm() protection that was added in the main branch. It protects the queues from page insertions that can happen during buffer rundown of asynchronous I/O read-aheads. Notes: svn path=/stable/2.1/; revision=16383
* Brought in some fixes from main branch: similar to last commit...moveDavid Greenman1996-06-141-3/+3
| | | | | | | | setting of PG_MAPPED (and in this case, PG_WRITEABLE too) to after pmap_enter() has finished. Notes: svn path=/stable/2.1/; revision=16376
* Brought in a fix from main branch: move setting of PG_MAPPED to after aDavid Greenman1996-06-141-3/+3
| | | | | | | | | | | call to pmap_enter(). Closes a window where PG_MAPPED might be cleared if the process blocked and someone else does a vm_page_protect(NONE) before the process unblocks. Reviewed by: dyson Notes: svn path=/stable/2.1/; revision=16375
* Brought in fix from rev 1.26: fix for "vm_page_free: freeing busy page"David Greenman1996-05-261-1/+2
| | | | | | | panic. Notes: svn path=/stable/2.1/; revision=15911
* Retrofitted a portion of rev 1.73: be sure to start inactive scan over ifDavid Greenman1996-05-261-1/+4
| | | | | | | | "next" page is no longer on the inactive queue. This fixes a potential panic during heavy paging. Notes: svn path=/stable/2.1/; revision=15907
* Fixes for a couple of minor bugs:David Greenman1996-04-261-10/+11
| | | | | | | | | | | | | | | 1) allocate map VM from the kernel_map, not the kmem_map. 2) update map hint properly when simplifying a map and remove unnecessary restriction on object->paging_in_progress. The above problems wouldn't have caused any panics, and it's unlikely that there were any noticeable effects due to the bugs...but they're bugs nonetheless. Submitted by: dyson Notes: svn path=/stable/2.1/; revision=15389
* Brought in change from rev 1.70: add spl0() to vmdaemon.David Greenman1996-04-121-1/+3
| | | | Notes: svn path=/stable/2.1/; revision=15206
* Revert to previous calculation of vm_object_cache_max: it simply worksDavid Greenman1996-03-291-2/+2
| | | | | | | | better in most real-world cases. This comes after extensive analysis of file caching behavior on wcarchive... Notes: svn path=/stable/2.1/; revision=14901
* Retrofitted changes to add NO_SWAPPING option from -current (actually, it'sDavid Greenman1996-02-222-15/+24
| | | | | | | | | | | | | the other way around - the changes in -current were based on these). The NO_SWAPPING option disables U-area paging (struct user & kernel stack) and can help improve performance in some special circumstances where a system has plenty of main memory and also has a lot of processes that are often in short waits (< 1 minute) but wake up frequently. Such is the case on a busy FTP archive like wcarchive. This option does not affect generic VM system paging. Notes: svn path=/stable/2.1/; revision=14180
* Brought in change from rev 1.60: "out of space" -> "out of swap space"David Greenman1996-01-311-2/+2
| | | | Notes: svn path=/stable/2.1/; revision=13791
* Brought in sigexit()/killproc() bugfix, associated improvement to theirDavid Greenman1996-01-311-3/+2
| | | | | | | output, and new killproc usage from main branch. Notes: svn path=/stable/2.1/; revision=13789
* Brought in change from rev 1.22: better message when mb_map is filled.David Greenman1996-01-311-2/+2
| | | | Notes: svn path=/stable/2.1/; revision=13787
* Brought in change from rev 1.61: increased vm_object_cache_max to handleDavid Greenman1996-01-291-2/+2
| | | | | | | more small files. Notes: svn path=/stable/2.1/; revision=13710
* Retrofitted change from rev 1.38: check for failure of vm_map_find whenDavid Greenman1996-01-291-7/+9
| | | | | | | forking. Notes: svn path=/stable/2.1/; revision=13706
* Brought in change from rev 1.26: moved vm_map_lock call to close window.David Greenman1995-11-121-2/+2
| | | | Notes: svn path=/stable/2.1/; revision=12227
* Brought in changes from rev 1.28: remove unnecessary tsleep that couldDavid Greenman1995-10-161-2/+1
| | | | | | | result in processes not being swapped in when they were supposed to be. Notes: svn path=/stable/2.1/; revision=11540
* Brought in changes from rev 1.26: check return value of vm_map_pageable()s.David Greenman1995-09-171-4/+8
| | | | Notes: svn path=/stable/2.1/; revision=10836
* Brought in one small bug fix from the main branch: swap_pager_copy() mustDavid Greenman1995-07-221-4/+1
| | | | | | | not return without doing its work. Notes: svn path=/stable/2.1/; revision=9635
* Brought in "VOP_GETATTR" fix from the main branch. See rev 1.43 ofDavid Greenman1995-07-202-39/+31
| | | | | | | vnode_pager.c for details. Notes: svn path=/stable/2.1/; revision=9589
* Bring a fragment of a fix in the 2.2 branch: Don't mess with sw_piip; theDavid Greenman1995-07-201-7/+1
| | | | | | | frobbing is useless and results in bogus wakeups occurring. Notes: svn path=/stable/2.1/; revision=9584
* (2.1.0 branch)David Greenman1995-07-071-14/+35
| | | | | | | | Brought in changes from rev 1.42 - fix "object deallocated too many times" panic on NFS client. Notes: svn path=/stable/2.1/; revision=9418
* (2.1.0 branch)David Greenman1995-06-141-1/+2
| | | | | | | | | | | Added a missing vm_object_unlock(). This is a no-op since we don't use object locking, but it looks like a bug and it's good to be consistent anyway. Reviewed by: John Dyson Notes: svn path=/stable/2.1/; revision=9229
* This commit was manufactured by cvs2svn to create branch 'RELENG_2_1_0'.cvs2svn1995-06-132-519/+0
| | | | Notes: svn path=/stable/2.1/; revision=9211
* Merge RELENG_2_0_5 into HEADRodney W. Grimes1995-06-111-3/+3
| | | | Notes: svn path=/head/; revision=9202
* Remove trailing whitespace.Rodney W. Grimes1995-05-3014-130/+130
| | | | Notes: svn path=/head/; revision=8876
* Removed check for sw_dev == NODEV; this is a normal condition for swapDavid Greenman1995-05-251-3/+2
| | | | | | | | | | over NFS and was gratuitously panicing when it happens. Reviewed by: John Dyson Submitted by: Pierre Beyssac via Poul-Henning Kamp Notes: svn path=/head/; revision=8743
* Changes to fix the following bugs:David Greenman1995-05-212-3/+4
| | | | | | | | | | | | | | | | | | 1) Files weren't properly synced on filesystems other than UFS. In some cases, this lead to lost data. Most likely would be noticed on NFS. The fix is to make the VM page sync/object_clean general rather than in each filesystem. 2) Mixing regular and mmaped file I/O on NFS was very broken. It caused chunks of files to end up as zeroes rather than the intended contents. The fix was to fix several race conditions and to kludge up the "b_dirtyoff" and "b_dirtyend" that NFS relies upon - paying attention to page modifications that occurred via the mmapping. Reviewed by: David Greenman Submitted by: John Dyson Notes: svn path=/head/; revision=8692
* NFS diskless operation was broken because swapdev_vp wasn't initialized.David Greenman1995-05-191-1/+6
| | | | | | | | | | These changes solve the problem in a general way by moving the initialization out of the individual fs_mountroot's and into swaponvp(). Submitted by: Poul-Henning Kamp Notes: svn path=/head/; revision=8624
* Fixed a bug that managed to slip in during Poul's dynamic swap partitionDavid Greenman1995-05-181-17/+11
| | | | | | | | | | | changes. The check for nswap was bogus, but the code was so convoluted that it was difficult to tell. It's better now. :-) Reviewed by: David Greenman (extensively), and John Dyson Submitted by: Poul-Henning Kamp, w/tweaks by me. Notes: svn path=/head/; revision=8588
* Accessing pages beyond the end of a mapped file results in internalDavid Greenman1995-05-185-26/+37
| | | | | | | | | | | | | | | | inconsistencies in the VM system that eventually lead to a panic. These changes fix the behavior to conform to the behavior in SunOS, which is to deny faults to pages beyond the EOF (returning SIGBUS). Internally, this is implemented by requiring faults to be within the object size boundaries. These changes exposed another bug, namely that passing in an offset to mmap when trying to map an unnamed anonymous region also results in internal inconsistencies. In this case, the offset is forced to zero. Reviewed by: John Dyson and others Notes: svn path=/head/; revision=8585
* Changed swap partition handling/allocation so that it doesn'tDavid Greenman1995-05-143-122/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | require specific partitions be mentioned in the kernel config file ("swap on foo" is now obsolete). From Poul-Henning: The visible effect is this: As default, unless options "NSWAPDEV=23" is in your config, you will have four swap-devices. You can swapon(2) any block device you feel like, it doesn't have to be in the kernel config. There is a performance/resource win available by getting the NSWAPDEV right (but only if you have just one swap-device ??), but using that as default would be too restrictive. The invisible effect is that: Swap-handling disappears from the $arch part of the kernel. It gets a lot simpler (-145 lines) and cleaner. Reviewed by: John Dyson, David Greenman Submitted by: Poul-Henning Kamp, with minor changes by me. Notes: svn path=/head/; revision=8504