aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* MFS: msync(2) with the MS_INVALIDATE flag should not delete dirty pages.Dag-Erling Smørgrav2004-05-251-1/+7
| | | | | | | Approved by: so Notes: svn path=/releng/4.9/; revision=129736
* Add an include I forgot in the previous commit. Eeek.Mike Silbersack2003-10-021-0/+1
| | | | Notes: svn path=/stable/4/; revision=120655
* MFC rev 1.309 ; increase the # of kmap entries allowed.Mike Silbersack2003-10-011-1/+2
| | | | | | | Approved by: re (murray) Notes: svn path=/stable/4/; revision=120644
* Fix a bug which was introduced in version 1.187.2.16 ofAndrew Gallatin2003-10-011-0/+1
| | | | | | | | | | | | | | | | | | sys/vm/vm_map.c and affects the unwiring memory: The map entries are processed in a loop, checking to make sure the entry is wired and asserting it has a wired count. However, another loop was inserted more-or-less in the middle of the of the unwiring path. This loop picks up the "entry" loop variable from the first loop without first setting it to start_entry. Naturally, the second loop is never entered and the pages backing the entries are never unwired. This can lead to a leak of wired pages. Reviewed by: alc Approved by: re (murray) Notes: svn path=/stable/4/; revision=120618
* MFC BUS_DMA_ZERO support for busdma memory allocations, and M_ZEROMike Silbersack2003-09-251-1/+5
| | | | | | | | | support for contigmalloc, which is required for BUS_DMA_ZERO support. Approved by: re (scottl) Notes: svn path=/stable/4/; revision=120440
* MFC rev 1.302:Tor Egge2003-08-101-1/+2
| | | | | | | | Check the address provided to vm_map_stack() against the vm map's maximum, returning an error if the address is too high. Notes: svn path=/stable/4/; revision=118735
* MFC: PAE support, based on Jake Burkholder's work in current. Jake'sLuoqi Chen2003-08-099-40/+40
| | | | | | | | | | | | | | work was sponsored by DARPA, Network Associates Laboratories. Major changes include: - introduction of vm_paddr_t to represent physical address - support for page directory pointer table - removal of (recursive) alternative address space Reviewed by: jake Notes: svn path=/stable/4/; revision=118695
* MFCAlan Cox2003-05-271-1/+2
| | | | | | | | | Make the reservation of KVA space for kernel map entries a function of the KVA space's size in addition to the amount of physical memory and reduce it by a factor of two. Notes: svn path=/stable/4/; revision=115340
* MFCAlan Cox2003-05-263-28/+16
| | | | | | | | Reduce the size of a vm object by converting its shadow list from a TAILQ to a LIST. Notes: svn path=/stable/4/; revision=115327
* primarily MFC vm_map.c 1.275. Also pull-in vm_waitproc() andMatthew Dillon2003-01-134-16/+57
| | | | | | | | | | cpu_wait() changes from current. This should close reference count races with the vmspace structure. There is still a shmexit() race (structure never freed) which will be addressed in a day or two with a fix MFC from current. Notes: svn path=/stable/4/; revision=109204
* MFC improved VM object flushing code, allowing the syncer to clusterMatthew Dillon2002-12-313-8/+22
| | | | | | | | dirty VM pages (dirtied via mmap()) that back a file. Please see the log entry for rev 1.250 of vm_object.c. Notes: svn path=/stable/4/; revision=108499
* MFC use correct flag name in call to vm_pager_put_pages(). It just happenedMatthew Dillon2002-12-291-1/+1
| | | | | | | | | to have the same value as the previously (incorrect) name. No operational changes. Notes: svn path=/stable/4/; revision=108398
* MFC ELF coredump handling fixes. Do not skip read-only pages unrelatedMatthew Dillon2002-12-281-0/+1
| | | | | | | | | | | | to the binary image. Use NOCORE to differentiate between the two. Introduce a debug.elf_legacy_coredump sysctl which, if set, reverts to the old behavior. See the log message in sys/kern/imgact_elf.c 1.133. PR: kern/45994 Notes: svn path=/stable/4/; revision=108355
* stable-only commit (does not apply to -current). Allow a zone to be taggedMatthew Dillon2002-10-102-4/+14
| | | | | | | | | to panic the machine if the zone allocation fails. This will be used to catch zone allocations that fail that code assumes always succeed (can occur if we run out of KVM). Notes: svn path=/stable/4/; revision=104821
* MFC fix vm_map_entry collisions and buffer_map collisions that can occurMatthew Dillon2002-10-103-297/+541
| | | | | | | | | | | | | | | | | | | | under very heavy memory pressure. There are places where the kernel can block where it normally does not block which were not properly handled. These fixes have been heavily tested. They are based on work Alan and Tor have done in -current but are not a direct MFC. They are not entirely optimal but they should be solid. Add a new sysctl counter, vm.v_intrans_coll and vm.v_intrans_wait which indicates how many times a vm_map_entry collision has been detected and how many times vm_map code had to block waiting for a collision to clear. Reviewed by: alc, tegge Testing by: "Marc G. Fournier" <scrappy@hub.org> (note: there are still unresolved bugs on Marc's boxes unrelated to this patch). Notes: svn path=/stable/4/; revision=104819
* MFC: 1.268Matthew N. Dodd2002-09-261-7/+10
| | | | | | | | | | | | Modify vm_map_clean() (and thus the msync(2) system call) to support invalidation of cached pages for objects of type OBJT_DEVICE. Submitted by: Christian Zander <zander@minion.de> Reviewed by: alc Approved by: re (jhb) Notes: svn path=/stable/4/; revision=104013
* Reduce the maximum KVA reserved for swap meta structures from 70 to 32 MB.Matthew Dillon2002-08-311-2/+2
| | | | | | | Reduce the swap meta calculation by a factor of 2, it's still massive overkill. Notes: svn path=/stable/4/; revision=102739
* Unconditionally initialise z->znext, and remove the zone from theIan Dowse2002-08-121-7/+5
| | | | | | | | | | | | list of all zones if we fail to allocate KVA for it in zinitna(). Apparently this fixes panics while running sysctl on large-memory machines. This code is not present in -current. PR: kern/36605 Submitted by: Brian Buchanan <brian@ncircle.com> Notes: svn path=/stable/4/; revision=101764
* MFC RLIMIT_VMEM resource Stage I - limit the total virtual memory use forMatthew Dillon2002-07-023-0/+23
| | | | | | | a process (exec() to be handled in Stage II). Notes: svn path=/stable/4/; revision=99274
* MFC 1.201 - add a sequential iteration optimization to vm_object_page_clean().Matthew Dillon2002-06-181-75/+194
| | | | | | | | | | This greatly improves msync() and VM object flushing and greatly improves cpu overheads related to VM object flushing on large objects. Yahoo has been running this patch set since March (and it has also been in -current since March). Notes: svn path=/stable/4/; revision=98398
* MFC: r1.75 - don't deadlock if the system is low on physical memory andTor Egge2002-03-121-0/+12
| | | | | | | malloc is called with both size > PAGE_SIZE and the M_NOWAIT flag set. Notes: svn path=/stable/4/; revision=92159
* MFC: [vm/vm_contig.c rev 1.5] Call vm_page_unqueue_nowakeup()Alan Cox2002-03-101-5/+1
| | | | | | | in contigmalloc1() rather than duplicating it. Notes: svn path=/stable/4/; revision=91980
* MFC 1.213, fix mmap/msync bug which can panic the kernelMatthew Dillon2002-03-081-1/+4
| | | | Notes: svn path=/stable/4/; revision=91899
* MFC of the vm_daemon speedup when many shared pages and processes are present.Mike Silbersack2002-03-062-2/+2
| | | | | | | | | | | | | | | | | For full log, see: Revision Changes Path 1.84 +19 -5 src/sys/alpha/alpha/pmap.c 1.316 +19 -8 src/sys/i386/i386/pmap.c 1.44 +19 -6 src/sys/ia64/ia64/pmap.c 1.14 +21 -1 src/sys/powerpc/powerpc/pmap.c 1.35 +19 -2 src/sys/sparc64/sparc64/pmap.c 1.11 +9 -0 src/sys/sparc64/sparc64/pv.c 1.42 +2 -2 src/sys/vm/pmap.h 1.189 +1 -1 src/sys/vm/vm_pageout.c Notes: svn path=/stable/4/; revision=91768
* MFC __P() macro cleanup, register keyword removal in preparation forMatthew Dillon2002-03-062-148/+98
| | | | | | | | object->memq scan-marker work (similar to the buffer queue scan marker work). Notes: svn path=/stable/4/; revision=91721
* add a missing vmspace_free() that can occur when idle-process swappingMatthew Dillon2002-03-061-0/+5
| | | | | | | | | is enabled. This bug appears to already be indirectly fixed in -current. PR: kern/32659 Notes: svn path=/stable/4/; revision=91718
* MFC: [Revision 1.94] Add a new page queue, PQ_HOLD.Alan Cox2002-03-032-20/+20
| | | | | | | [Revision 1.95] Remove dead code. Notes: svn path=/stable/4/; revision=91573
* MFC rev 1.177Mike Silbersack2002-02-261-0/+3
| | | | | | | | Add one more comment to the OOM changes so that future readers of the code may better understand the code. Notes: svn path=/stable/4/; revision=91332
* MFC OOM killer changes:Mike Silbersack2002-02-264-4/+28
| | | | | | | | | | | | | | | | | | | | Changes to make the OOM killer much more effective: - Allow the OOM killer to target processes currently locked in memory. These very often are the ones doing the memory hogging. - Drop the wakeup priority of processes currently sleeping while waiting for their page fault to complete. In order for the OOM killer to work well, the killed process and other system processes waiting on memory must be allowed to wakeup first. Revision Changes Path 1.128 +2 -2 src/sys/vm/vm_fault.c 1.176 +23 -0 src/sys/vm/vm_page.c 1.188 +1 -2 src/sys/vm/vm_pageout.c 1.28 +3 -1 src/sys/vm/vm_pageout.h Notes: svn path=/stable/4/; revision=91284
* MFC remove P_BUFEXHAUST scrapsMatthew Dillon2002-01-311-1/+0
| | | | Notes: svn path=/stable/4/; revision=90034
* MFC the following:Matthew Dillon2001-12-251-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * LK_TIMEOUT lock flag to separate lock acquisition with and without a timeout (dillon) * use of LK_TIMEOUT in BUF_TIMELOCK to avoid timeout race aginst BUF_LOCK (dillon) * use of LK_TIMEOUT in pageout vget() code to avoid deadlock (dillon) * move vnode reclaim into its own kthread to avoid deadlocks (Yahoo) * remove 'VXLOCK interlock avoided' messages.. they can occur under normal operation and create a choking hazzard on the console. * Adjust VMIGHTFREE macro used with vnode reclaim code to avoid eating large amounts of cpu with little to show for it in certain situations. * Add VREF/VRELE around UFS_UPDATE() call to avoid update/reclaim race (note: snuck in at last minute but I accidently did a partial commit a moment ago and the tree is broken until I commit the rest of it). This is minor and will be tested heavily. Approved by: Release Engineers Notes: svn path=/stable/4/; revision=88467
* MFC NFS and VM bug fixes (see my commit 2001/12/13 17:16:57 PST,Matthew Dillon2001-12-202-2/+41
| | | | | | | | | kern/vfs_bio.c 1.295 and friends) Approved by: Release Engineers Notes: svn path=/stable/4/; revision=88312
* MFC: r1.49; do not contstrain zone_interrupt objects to a page boundary.Jonathan Lemon2001-12-141-2/+4
| | | | Notes: svn path=/stable/4/; revision=87906
* MFC B_NOWDRAIN. This required moving B_AUTOCHAINDONE from flags to xflagsMatthew Dillon2001-11-181-3/+3
| | | | | | | | (B_ -> BX_). Modify the VN device to use IO_NOWDRAIN (MFC from similar change in -current's MD device). Notes: svn path=/stable/4/; revision=86541
* MFC 1.127 - fix a deadlock that can occur in certain situations when aMatthew Dillon2001-11-171-1/+5
| | | | | | | | | mmap()'d file is truncated. Submitted by: peter, ps Notes: svn path=/stable/4/; revision=86480
* MFC: move the code for calculating the system load average intoIan Dowse2001-11-142-46/+0
| | | | | | | | kern_synch.c. Add jitter to the timing of samples to avoid synchronisation with processes that run periodically. Notes: svn path=/stable/4/; revision=86361
* MFC: 1.59; Remove the SSLEEP case from the load average computation,Ian Dowse2001-11-141-4/+0
| | | | | | | since it has been a no-op for as long as our CVS history goes back. Notes: svn path=/stable/4/; revision=86351
* MFC: Don't remove all mappings of a swapped out process if the vm mapTor Egge2001-11-101-1/+5
| | | | | | | | contained wired entries. vm_fault_unwire() depends on the mapping being intact. Notes: svn path=/stable/4/; revision=86245
* MFC: Fix locking violations during page wiring.Tor Egge2001-11-101-3/+32
| | | | | | | Fix cleanup after page wiring failure. Notes: svn path=/stable/4/; revision=86244
* MFC 1.139 - fix vnode_pager_input_smlfs() to not attempt to BMAPMatthew Dillon2001-11-091-2/+7
| | | | | | | | | | blocks beyond the file EOF. Fixes bogus mmap() fault on the last block of certain files on CDRom. Reported by: peter / Yahoo Notes: svn path=/stable/4/; revision=86202
* MFC implement kern.maxvnodes (primarily kern/vfs_subr.c 1.326), sync,Matthew Dillon2001-11-034-5/+50
| | | | | | | | | | | | | | | | | | | | and other VM optimizations and fixes. * Add VOBJDIRTY flag to vnode to avoid certain indirections. * Turn the mount structure vnode list into an LRU queue (LIST -> TAILQ) * Attempt to reuse vnodes when we hit the maxvnodes limit * Optimize msync() to avoid unnecessary v_interlocks * Optimize ffs_sync() for same * Fix vm_object double-termination bug * Add KASSERT to ensure that backing object is not freed out from under remaining VM pages. These fixes change the mount structure and will create a binary kld module incompatibility with filesystem kld's, but I deem the scaling issues with 4.x that we are fixing to be more important. Notes: svn path=/stable/4/; revision=85987
* MFC:Paul Saab2001-11-034-11/+15
| | | | | | | | | | | | - Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loader tunable. - Change TUNABLE_*_FETCH to have a return value of 0 if the variable was not found or successfully converted and true otherwise. - Use vm_offset_t instead of caddr_t to fix a warning and remove two casts in kern_exec.c. Notes: svn path=/stable/4/; revision=85936
* MFC don't let pmap_object_init_pt() exhaust all available freeMatthew Dillon2001-11-032-1/+2
| | | | | | | | | pages (madvise kernel panic fix). Submitted by: ps, peter Notes: svn path=/stable/4/; revision=85929
* MFC syntax cleanup and documentation, no operational changes.Matthew Dillon2001-10-231-5/+9
| | | | Notes: svn path=/stable/4/; revision=85333
* MFC vm_contig.c 1.4, properly track vm_page_zero_count in contigmalloc1()Matthew Dillon2001-10-171-0/+2
| | | | | | | Submitted by: mark tinguely <tinguely@web.cs.ndsu.nodak.edu> Notes: svn path=/stable/4/; revision=85071
* MFC kern/vfs_subr.c 1.263, sys/vnode.h 1.118, vm/vm_page.c 1.153. ThisMatthew Dillon2001-10-161-6/+2
| | | | | | | | | MFCs Kirk's vnode freelist cleanup commit from July 2000 in preparation for further work that will eventually make kern.maxvnodes actually do something. Notes: svn path=/stable/4/; revision=85038
* MFC 1.138 fix VM bug related to dirty VM pages backed by a filesystemMatthew Dillon2001-10-151-3/+21
| | | | | | | | | | fragment where the dirty bits on the VM pages would never get cleared. The bug could cause unnecessary disk writing every 30-60 seconds and potentially force more vnodes to remain in the vnode cache, but doesn't occur very often so most people don't need to worry. Notes: svn path=/stable/4/; revision=85003
* MFC vm_contig.c 1.3. note: contigmalloc in -4.x is in vm_page.c. FixMatthew Dillon2001-10-151-4/+12
| | | | | | | contigmalloc[1]() so contigfree() actually works. Notes: svn path=/stable/4/; revision=85001
* MFC: 1.110; permit direct swapping to NFS regular files usingIan Dowse2001-10-141-3/+10
| | | | | | | swapon(2). Notes: svn path=/stable/4/; revision=84924
* MFC 1.150, 1.162 - reduce the size of the swap zone if we run out of KVM.Matthew Dillon2001-10-031-9/+22
| | | | Notes: svn path=/stable/4/; revision=84401