summaryrefslogtreecommitdiff
path: root/sys/uvm
AgeCommit message (Collapse)Author
2014-02-06add some more bufbackoff calls. uvm_wait optimistically (?), uvm_wait_plaTed Unangst
after analysis and testing. when flushing a large mmapped file, we can eat up all the reserve bufs, but there's a good chance there will be more clean ones available. ok beck kettenis
2014-02-06parenthesis to make the math right. ok beck kettenisTed Unangst
2014-02-04reduce the length of some pool names. ok deraadt guenther mpiTed Unangst
2014-01-30Move declaration of struct vm_page_md from <machine/vmparam.h> toMiod Vallat
<machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h> by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all MACHINE_ARCH but amd64 and i386 (and hppa64).
2014-01-23unifdef -D__HAVE_VM_PAGE_MD - no functional change.Miod Vallat
2014-01-01Remove __HAVE_PMAP_PHYSSEG support, nothing uses it anymore.Miod Vallat
2013-12-09forgot to say: aobj grow/shrink tweaks are mostly from Pedro Martelletto,Marc Espie
like the rest of tmpfs
2013-12-08allow aobj to shrink grow, for tmpfs supportMarc Espie
A few tweaks asked by kettenis@ (code doesn't affect systems without mounted tmpfs at all) okay beck@
2013-11-24Replace the swapdev CIRCLEQ with a TAILQ and replace the manually rolledJoel Sing
list traversals with LIST_FOREACH. ok beck@ krw@
2013-11-21remove the #define b_cylinder b_resid from bufs. i hated theDavid Gwynne
overloading of that thing. the only hardware that seems to care about cylinders in our tree are floppy drives, and the drivers for those calculate their own cylinders from logical block addresses and ignore whatever the rest of the kernel thought b_cylinders should be. most of this diff is moving the floppy drivers to using b_resid as a resid and using that as part of the calculation for real cylinder values. the rest of the diff is getting rid of the useless assignments to b_cylinder that dont get used by anything (now that disksort is gone). ok miod@
2013-11-20Update comments mentioning `resource maps' to mention `extents' instead.Miod Vallat
Resource maps have been removed more than 10 years ago, it's about time to update comments to better match reality. No functional change.
2013-11-09Add KASSERT()s to tsleep() and msleep() to verify that bogus flagsPhilip Guenther
aren't being passed to them. Fix UVM_WAIT() to not pass PNORELOCK to tsleep(), as that flag only does something with msleep(). ok beck@ dlg@
2013-11-06remove some abuse of bufqs where they were overloaded to store workq_tasksDavid Gwynne
for completing swap io against files. this in turn bloated struct buf. this moves from using workq_tasks to the task api, but stores the task handler in vndbuf which is allocated specially for every io in this path anyway. ok kettenis@ beck@
2013-11-05new function uvm_hibswap() finds a the largest free zone in swap, whichTheo de Raadt
hibernate can use place the data. ok mlarkin
2013-11-04If compiled for hibernate, reserve the last page of the primary swapTheo de Raadt
space (in case we need to place a hibernate signature there) ok miod
2013-11-04improve a panic messageTheo de Raadt
2013-11-02fix some commentsTheo de Raadt
2013-11-02No need to cast constants or simple variables to (daddr_t). UseKenneth R Westerback
(u_int64_t) instead of (daddr_t) when casting a variable in an expression passed to DL_SETDSIZE(). Change a variable counting open files from daddr_t to int64_t. ok deraadt@ with the tweak to fix that pesky expression.
2013-09-21Don't invoke pmap_copy() on map holes.Miod Vallat
2013-08-13Make the tree compile again on architectures without drm(4).Mark Kettenis
ok maja@, miod@, jsg@
2013-07-09back out the cache flipper temporarily to work out of tree.Bob Beck
will come back soon. ok deraadt@
2013-06-21Buffer cache pages are wired but not counted as such. Therefore we have toMark Kettenis
set the wire count on the pages to 0 before we call uvm_pagefree() on them, just like we do in buf_free_pages(). Otherwise the wired pages counter goes negative. While there, also sprinkle some KASSERTs in there that buf_free_pages() has as well. ok beck@
2013-06-11High memory page flipping for the buffer cache.Bob Beck
This change splits the buffer cache free lists into lists of dma reachable buffers and high memory buffers based on the ranges returned by pmemrange. Buffers move from dma to high memory as they age, but are flipped to dma reachable memory if IO is needed to/from and high mem buffer. The total amount of buffers allocated is now bufcachepercent of both the dma and the high memory region. This change allows the use of large buffer caches on amd64 using more than 4 GB of memory ok tedu@ krw@ - testing by many.
2013-06-11final removal of daddr64_t. daddr_t has been 64 bit for a long enoughTheo de Raadt
test period; i think 3 years ago the last bugs fell out. ok otto beck others
2013-06-07Add proper mmap(2) support for drm(4)/inteldrm(4). This changes theMark Kettenis
DRM_I915_GEM_MMAP and DRM_I915_GEM_MMAP_GTT ioctls to be compatible with Linux. This also is the first step that moves us away from accessing all graphics memory through the GTT, which should make things faster. ok tedu@ (for the uvm bits)
2013-05-30in the brave new world of void *, we don't need caddr_t castsTed Unangst
2013-05-30UVM_UNLOCK_AND_WAIT no longer unlocks, so rename it to UVM_WAIT.Ted Unangst
2013-05-30remove lots of comments about locking per beck's requestTed Unangst
2013-05-30remove simple_locks from uvm code. ok beck deraadtTed Unangst
2013-05-29uvm_loan has not (ever) been compiled or used.Ted Unangst
2013-05-23the simplelock is a lieTed Unangst
2013-05-14restore ABI compatibility; guentherMiod Vallat
2013-05-14Remove `swapin' and `swapout' from uvm statistics, since we don't swap outMiod Vallat
u areas since quite a few years now.
2013-05-03fix mem leak in swapmountFlorian Obser
pointed out by jsg@ ok tedu@
2013-04-17it is better if we always start addr at something reasonable, andTed Unangst
then move it up. previous revision would leave addr uninitialized. pointed out by oga at nicotinebsd.org
2013-04-17do not permanently avoid the BRKSIZ gap in the heap for mmap. after someTed Unangst
allocations have been made, open it up. this is a variation on a previous change that was lost in the great uvm map rewrite. allows some platforms, notably i386, to fully utilize their address space.
2013-04-17Unbreak and cleanup diskless swap automount.Florian Obser
Initial diff to replace unclear short variable name "nd" by "nfs_diskless" and to display the real nfs path to swap in pstat -s by deraadt@ Testing by me revealed diskless swap automount was broken since some time. Fix this by passing and using the correct vnode in nfs_diskless to swapmount(). Lots of input / help deraadt@, tweaks by deraadt@ OK deraadt@
2013-03-31do not need machine/cpu.h directlyTheo de Raadt
2013-03-28do not copy additional kernel memory into the swapent.se_path[]Theo de Raadt
ok tedu
2013-03-27combine several atomic_clearbits calls into one. slightly faster onTed Unangst
machines where atomic ops aren't so simple. ok beck deraadt miod
2013-03-23refactor sys/param.h and machine/param.h. A lot of #ifdef _KERNEL is addedTheo de Raadt
to keep definitions our of user space. The MD files now follow a consistant order -- all namespace intrusion is at the tail can be cleaned up independently. locore, bootblocks, and libkvm still see enough visibility to build. Checked on 90% of platforms...
2013-03-12preserving main-branch topology for a perverse reason:Theo de Raadt
step 3 - re-merge 1.116 to 1.118
2013-03-12preserving main-branch topology for a perverse reason:Theo de Raadt
step 2 - re-merge 1.119 (the WAITOK diff)
2013-03-12preserving main-branch topology for a perverse reason:Theo de Raadt
step 1 - backout 1.116 to 1.119
2013-03-12Fix horrible typo of mine checking for WAITOK flags, found by sthen.Bob Beck
This fix actually by mikeb@, this needs thorough testing to verify it doesn't bring up other issues in what it hid. ok deraadt@
2013-03-06Account for the size of the allocation when defending the pagedaemon reserve.Bob Beck
Spotted by oga@nicotinebsd.org, with help from dhill@. Fix by me. ok miod@
2013-03-03Use local vm_physseg pointers instead of compting vm_physmem[index] gazillionsMiod Vallat
of times. No function change but makes the code a bit smaller. ok mpi@
2013-03-02Simplify uvm_pagealloc() to only need one atomic operation on the page flagsMiod Vallat
instead of two, building upon the knowledge of the state uvm_pagealloc_pg() leaves the uvm_page in. ok mpi@
2013-02-10Don't wait for memory from pool while holding vm_map_lock or we canBob Beck
deadlock ourselves - based on an infrequent hang caught by sthen, and diagnosed by kettenis and me. Fix after some iterations is to simply call uvm_map_allocate and allocate the map entry before grabbing the lock so we don't wait while holding the lock. ok miod@ kettenis@
2013-02-07Bring back reserve enforcement and page daemon wakeup into uvm_pglistalloc,Bob Beck
It was removed as this function was redone to use pmemrange in mid 2010 with the result that kernel malloc and other users of this function can consume the page daemon reserve and run us out of memory. ok kettenis@