summaryrefslogtreecommitdiffstats
path: root/sys/uvm (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add a new mmap(2) flag __MAP_NOREMAP for use with MAP_FIXED tomatthew2012-07-211-2/+6
| | | | | | | | | | | | | indicate that the kernel should fail with MAP_FAILED if the specified address is not currently available instead of unmapping it. Change ld.so on i386 to make use of __MAP_NOREMAP to improve reliability. __MAP_NOREMAP diff by guenther based on an earlier diff by Ariane; ld.so bits by guenther and me bulk build stress testing of earlier diffs by sthen ok deraadt; committing now for further testing
* comment typo; s/lineair/linear/matthew2012-07-181-2/+2
|
* Three cases that should be failures, not successes when checking for availmlarkin2012-07-121-5/+5
| | | | swap region for hibernate.
* #ifdef the uvm swap checker fn for hibernate only, to save space in kernelsmlarkin2012-07-112-2/+6
| | | | | | that don't use hibernate requested by and ok deraadt@
* add a check for the total size of swap, abort if too small.mlarkin2012-07-111-1/+4
| | | | | | used by the hibernate code. ok deraadt@
* add uvm_swap_check_range to scan for contig free space at end of swap.mlarkin2012-07-112-2/+47
| | | | | | will be needed shortly for hibernate. ok deraadt@
* Remove uvm_km_kmem_grow printf.ariane2012-06-141-3/+1
| | | | | | It's no longer required, code is stable. ok kettenis@
* whitespace cleanupjasper2012-06-141-34/+34
| | | | ok ariane@
* fix typo in commentjasper2012-06-141-2/+2
| | | | ok ariane@
* Fix address-space randomization that was accidentally disabled inmatthew2012-06-061-2/+5
| | | | | | uvm_addr.c r1.3. ok deraadt, tedu
* Make sure uvm_map_extract() entesr mappings at an address that doesn'tkettenis2012-06-031-2/+3
| | | | | | | introduce any virtual cache aliasing problems. Fixes a regression introduced by vmmap. ok ariane@, jsing@
* Correct handling of mlock()/munlock() with len==0 to return successguenther2012-06-011-2/+6
| | | | | | | | instead of crashing. Add a KASSERT() to catch other bugs that might result in the tree iterators being reversed. Problem observed by Tom Doherty (tomd at singlesecond.com) ok deraadt@
* Add struct proc * argument to FRELE() and FILE_SET_MATURE() inguenther2012-04-221-4/+4
| | | | | | anticipation of further changes to closef(). No binary change. ok krw@ miod@ deraadt@
* Backout misplaced optimization in vmmap.ariane2012-04-191-12/+99
| | | | | (That means the misplaced optimization is back in.) It broke mips and possibly other architectures.
* uvmspace_exec: Remove disfunctional "optimization".ariane2012-04-171-99/+12
| | | | | | | The optimization goes through great lengths to use less optimized code paths in place of the simple path, where the latter is actually faster. ok tedu, guenther
* Remove dead UBC codeariane2012-04-121-4/+1
|
* uvm: keep track of maxrssariane2012-04-121-1/+46
| | | | | | | The fault path is used to update the maxrss of the faulting proc. Doesn't affect anything, as it was 0 before. Requested by espie, "just commit it" deraadt
* vmmap: speed up allocationsariane2012-04-113-95/+128
| | | | | | Reduces O(n log n) allocations to O(log n). ok deraadt, tedu
* Return EINVAL on 0-byte mmap invocation.ariane2012-04-101-1/+3
| | | | | | - Posix rules that a 0-byte mmap must return EINVAL - our allocators are unable to distinguish between free memory and 0 bytes of allocated memory
* Make rusage totals, itimers, and profile settings per-process insteadguenther2012-03-232-21/+7
| | | | | | | of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
* Fix vmmap SMALL_KERNEL introduced bug.ariane2012-03-151-8/+22
| | | | | | | | | | | The if (min < VMMAP_MIN_ADDR) min = VMMAP_MIN_ADDR; code should have moved across when the small_kernel diff moved the initialization from uvm_map_setup() to uvm_map_setup_md(). Prevents a nasty panic on hppa, sparc64 (and possibly other archs). kettenis: the diff make some sense to me
* Reduce installmedia pressure from new vmmap.ariane2012-03-154-42/+113
| | | | | | Has less special allocators on install media (where they aren't required anyway). Bonus: makes the vmmap initialization code easier to read.
* New vmmap implementation.ariane2012-03-0912-2989/+5887
| | | | | | | | | | | | no oks (it is really a pain to review properly) extensively tested, I'm confident it'll be stable 'now is the time' from several icb inhabitants Diff provides: - ability to specify different allocators for different regions/maps - a simpler implementation of the current allocator - currently in compatibility mode: it will generate similar addresses as the old allocator
* Prevent integer wrap-around in pmemrange.ariane2012-01-051-6/+6
| | | | | | | Found by and original fix from Geoff Steckel. While here, switch the assert that prevents this from happening from DEBUG to DIAGNOSTIC. ok thib@, miod@
* Be sure not to access the vm_page array out of bounds in uvm_pmr_freepages().miod2011-12-031-5/+5
| | | | | | | Among other things, this fixes early panics on hppa system which memory size is exactly 128MB. Found the hard way and reported by fries@, not reported by beck@
* Fix spelling and remove questionguenther2011-11-241-3/+3
|
* In ddb `show page', print the address of the vm_page_md substruct ifmiod2011-11-081-4/+9
| | | | defined(__HAVE_VM_PAGE_MD), for convenience.
* More syscalls.master cleanup:matthew2011-07-091-39/+1
| | | | | | | | | | | | | | sys_osigaltstack() is 7 years old and no longer needed; all glory to the sys_sigaltstack()! sys_ogetdirentries() is about 9 months old, but still acceptable within our release cycle; move from STD to COMPAT_48 to make this clearer for tedu@ next year. sys_sbrk() and sys_sstk() are completely obsolete: all they do is return ENOSYS. ok guenther@
* Move uvm_pmr_alloc_pig to kern/subr_hibernate.cariane2011-07-082-52/+2
| | | | No callers, no functional change.
* Move uvm_pmr_zero_everything() to subr_hibernate.ariane2011-07-082-41/+2
| | | | | | | This function will probably die before ever being called from the in-tree code, since hibernate will move to RLE encoding. No functional change, function had no callers.
* Expose pmemrange internal functions via pmemrange.h.ariane2011-07-082-21/+30
| | | | | | This is so I can move the pig allocator to subr_hibernate. No functional change.
* some machines don't boot with the previous uvm reserve enforcement diff.tedu2011-07-083-45/+36
| | | | back it out.
* Move the uvm reserve enforcement from uvm_pagealloc to pmemrange.oga2011-07-073-36/+45
| | | | | | | | | More and more things are allocating outside of uvm_pagealloc these days making it easy for something like the buffer cache to eat your last page with no repercussions (other than a hung machine, of course). ok ariane@ also ok ariane@ again after I spotted and fixed a possible underflow problem in the calculation.
* fix typos; while here, improve spacing in comments.sobrado2011-07-071-4/+4
| | | | | | changes to libevent and zlib headers sent to the upstream maintainers. ok jmc@ (for typos), millert@
* uvm changes for buffer cache improvements.beck2011-07-066-39/+244
| | | | | | | | | | | | | | | | | | 1) Make the pagedaemon aware of the memory ranges and size of allocations where memory is being requested, and pass this information on to bufbackoff(), which will later (not yet) be used to ensure that the buffer cache gets out of the way in the right area of memory. Note that this commit does not yet make it *do* that - as currently the buffer cache is all in dma-able memory and it will simply back off. 2) Add uvm_pagerealloc_multi - to be used by the buffer cache code for reallocating pages to particular regions. much of this work by ariane, with smatterings of me, art,and oga ok oga@, thib@, ariane@, deraadt@
* Don't derefence the item past the end of the array to figure out ifariane2011-07-051-6/+4
| | | | | | | the extraction loop should stop. No more 298 pages in 42 segments when asking for only 32 pages in 1 segment. ok oga@
* msync has some code that is based on *old* bsd behaviour whereoga2011-07-051-26/+2
| | | | | | | | | | | msync(size == 0) did strange things based on the original mapping segments and trying to manipulate same. This code was copied from the original vm when we moved to uvm. posix says nothing about this behaviour and anything that depends on it is systemically broken, so rip it out and make sys_msync about 30% smaller. ok deraadt@, tedu@, guenther@.
* allow option KVA_GUARDPAGES to compile.dhill2011-07-051-2/+2
|
* move the specfs code to a place people can see it; ok guenther thib krwderaadt2011-07-043-8/+6
|
* Replace inadvertantly removed line.oga2011-07-041-1/+2
| | | | | | | | now we can free vnodes again. ok gcc@, jetpack@, beck@, art@. (the results of this were hilarious)
* endodoify UVM_CNT too.oga2011-07-034-162/+4
| | | | ``beat it'' tedu@ the deleteotron
* Rip out and burn support for UVM_HIST.oga2011-07-0315-864/+24
| | | | | | | | The vm hackers don't use it, don't maintain it and have to look at it all the time. About time this 800 lines of code hit /dev/null. ``never liked it'' tedu@. ariane@ was very happy when i told her i wrote this diff.
* The UVM_STRAT defines have been unused since pmemrange was commited.oga2011-07-031-8/+1
| | | | | | They may die now. ``kill it'' thib@
* rename VFSDEBUG to VFLCKDEBUG;thib2011-07-021-3/+3
| | | | prompted by tedu@
* finish ansi in uvm. ok ariane ogatedu2011-06-302-13/+8
|
* Check for the correct flag when checking to see if the page is part of an aobj.oga2011-06-231-2/+2
| | | | | | | This is no function change since aobjs never actually hit this path. (also it is my bug from a while ago). ok ariane@
* Don't bother checking for an empty queue before calling uvm_pglistfree.oga2011-06-231-5/+3
| | | | | | | | It will handle an empty list just fine (there's a small optimisation possible here to avoid grabbing the fpageqlock if no pages need freeing, but that is definitely another diff) ok ariane@
* Replace handrolled version of uvmfault_unlockmaps with uvmfault_unlockmaps.oga2011-06-231-6/+2
| | | | ok ariane@
* Move uvm_pglistalloc and uvm_pglistfree to uvm_page.c and garbageoga2011-06-232-137/+76
| | | | | | | | | college uvm_pglist.c uvm_pglistalloc and free are just thin wrappers around pmemrange these days and don't really need their own file. ok ariane@
* Make mbufs and dma_alloc be contig allocations.ariane2011-06-232-3/+14
| | | | | | Requested by dlg@ ok oga@