summaryrefslogtreecommitdiff
path: root/sys/uvm
AgeCommit message (Collapse)Author
2012-04-22Add struct proc * argument to FRELE() and FILE_SET_MATURE() inPhilip Guenthe
anticipation of further changes to closef(). No binary change. ok krw@ miod@ deraadt@
2012-04-19Backout misplaced optimization in vmmap.Ariane van der Steldt
(That means the misplaced optimization is back in.) It broke mips and possibly other architectures.
2012-04-17uvmspace_exec: Remove disfunctional "optimization".Ariane van der Steldt
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
2012-04-12Remove dead UBC codeAriane van der Steldt
2012-04-12uvm: keep track of maxrssAriane van der Steldt
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
2012-04-11vmmap: speed up allocationsAriane van der Steldt
Reduces O(n log n) allocations to O(log n). ok deraadt, tedu
2012-04-10Return EINVAL on 0-byte mmap invocation.Ariane van der Steldt
- 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
2012-03-23Make rusage totals, itimers, and profile settings per-process insteadPhilip Guenthe
of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
2012-03-15Fix vmmap SMALL_KERNEL introduced bug.Ariane van der Steldt
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
2012-03-15Reduce installmedia pressure from new vmmap.Ariane van der Steldt
Has less special allocators on install media (where they aren't required anyway). Bonus: makes the vmmap initialization code easier to read.
2012-03-09New vmmap implementation.Ariane van der Steldt
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
2012-01-05Prevent integer wrap-around in pmemrange.Ariane van der Steldt
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@
2011-12-03Be sure not to access the vm_page array out of bounds in uvm_pmr_freepages().Miod Vallat
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@
2011-11-24Fix spelling and remove questionPhilip Guenthe
2011-11-08In ddb `show page', print the address of the vm_page_md substruct ifMiod Vallat
defined(__HAVE_VM_PAGE_MD), for convenience.
2011-07-09More syscalls.master cleanup:Matthew Dempsky
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@
2011-07-08Move uvm_pmr_alloc_pig to kern/subr_hibernate.cAriane van der Steldt
No callers, no functional change.
2011-07-08Move uvm_pmr_zero_everything() to subr_hibernate.Ariane van der Steldt
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.
2011-07-08Expose pmemrange internal functions via pmemrange.h.Ariane van der Steldt
This is so I can move the pig allocator to subr_hibernate. No functional change.
2011-07-08some machines don't boot with the previous uvm reserve enforcement diff.Ted Unangst
back it out.
2011-07-07Move the uvm reserve enforcement from uvm_pagealloc to pmemrange.Owain Ainsworth
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.
2011-07-07fix typos; while here, improve spacing in comments.Igor Sobrado
changes to libevent and zlib headers sent to the upstream maintainers. ok jmc@ (for typos), millert@
2011-07-06uvm changes for buffer cache improvements.Bob Beck
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@
2011-07-05Don't derefence the item past the end of the array to figure out ifAriane van der Steldt
the extraction loop should stop. No more 298 pages in 42 segments when asking for only 32 pages in 1 segment. ok oga@
2011-07-05msync has some code that is based on *old* bsd behaviour whereOwain Ainsworth
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@.
2011-07-05allow option KVA_GUARDPAGES to compile.David Hill
2011-07-04move the specfs code to a place people can see it; ok guenther thib krwTheo de Raadt
2011-07-04Replace inadvertantly removed line.Owain Ainsworth
now we can free vnodes again. ok gcc@, jetpack@, beck@, art@. (the results of this were hilarious)
2011-07-03endodoify UVM_CNT too.Owain Ainsworth
``beat it'' tedu@ the deleteotron
2011-07-03Rip out and burn support for UVM_HIST.Owain Ainsworth
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.
2011-07-03The UVM_STRAT defines have been unused since pmemrange was commited.Owain Ainsworth
They may die now. ``kill it'' thib@
2011-07-02rename VFSDEBUG to VFLCKDEBUG;Thordur I. Bjornsson
prompted by tedu@
2011-06-30finish ansi in uvm. ok ariane ogaTed Unangst
2011-06-23Check for the correct flag when checking to see if the page is part of an aobj.Owain Ainsworth
This is no function change since aobjs never actually hit this path. (also it is my bug from a while ago). ok ariane@
2011-06-23Don't bother checking for an empty queue before calling uvm_pglistfree.Owain Ainsworth
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@
2011-06-23Replace handrolled version of uvmfault_unlockmaps with uvmfault_unlockmaps.Owain Ainsworth
ok ariane@
2011-06-23Move uvm_pglistalloc and uvm_pglistfree to uvm_page.c and garbageOwain Ainsworth
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@
2011-06-23Make mbufs and dma_alloc be contig allocations.Ariane van der Steldt
Requested by dlg@ ok oga@
2011-06-22Validate pmemrange result, enabling early catching of bugs in the code.Ariane van der Steldt
ok beck@
2011-06-16Use the current page not he first page when working out whether toOwain Ainsworth
deactivate pages after syncing. While here, don't check flags for PQ_INACTIVE (this is the only place outside uvm_page.c where this is done) because pagedeactivate does this already. First part from Christian Ehrhart, second from me. Both ok ariane@. I meant to commit this about a week ago, but accidentally commited to my local cvs mirror then forgot about it.
2011-06-06Backout vmmap in order to repair virtual address selection algorithmsAriane van der Steldt
outside the tree.
2011-06-03randomness might be broken, but this changeTheo de Raadt
a) chooses incorrect kernel memory on the macppc b) perhaps on zaurus too, which does not make it to copyright c) was not tested on those platforms before commit
2011-06-01Oops, I broke randomness. (Please upgrade, this is _bad_.)Ariane van der Steldt
sel_addr &= ~(pmap_align - 1); with pmap_align allowed to be 0 (no PMAP_PREFER) is a bad idea. Fix this by a conditional. ok oga@
2011-05-30Remove the freelist member from vm_physsegOwain Ainsworth
The new world order of pmemrange makes this data completely redundant (being dealt with by the pmemrange constraints instead). Remove all code that messes with the freelist. While touching every caller of uvm_page_physload() anyway, add the flags argument to all callers (all but one is 0 and that one already used PHYSLOAD_DEVICE) and remove the macro magic to allow callers to continue without it. Should shrink the code a bit, as well. matthew@ pointed out some mistakes i'd made. ``freelist death, I like. Ok.' ariane@ `I agree with the general direction, go ahead and i'll fix any fallout shortly'' miod@ (68k 88k and vax i could not check would build)
2011-05-30for (some; stuff; here)Owain Ainsworth
; instead of for (some; stuff; here); reads easier. ok ariane@
2011-05-30s/hart/heart/ to make more sense (another dutchism).Owain Ainsworth
ok ariane@
2011-05-29Replace the lower bound PAGE_SIZE with VMMAP_MIN_ADDR.Ariane van der Steldt
This makes writing a diff that makes 64-bit unclean applications explode a one-line diff. ok deraadt
2011-05-29Fix parameter range clamping in vmmap routines.Ariane van der Steldt
The old VM_MAP_RANGE_CHECK macro was wrong and caused code to be unreadable (argument altering macros are harmful). Each function now treats the memory range outside the map as it would treat free memory: if it would error on being given free memory, it'll error in a similar fashion when the start,end parameters fall outside the map. If it would accept free memory in its argument range, it'll silently accept the outside-map memory too. Confirmed to help ports build machines.
2011-05-24Reimplement uvm/uvm_map.Ariane van der Steldt
vmmap is designed to perform address space randomized allocations, without letting fragmentation of the address space go through the roof. Some highlights: - kernel address space randomization - proper implementation of guardpages - roughly 10% system time reduction during kernel build Tested by alot of people on tech@ and developers. Theo's machines are still happy.
2011-05-10Don't leak swapslots when doing a uvm_km_pgremove and a page is in swap only.Owain Ainsworth
Before we were only calling uao_dropswap() if there was a page, maning that if the buffer was swapped out then we would leak the slot. Quite rare because only pipebuffers should swap from the kernel object, but i've seen panics that implied this had happened (alpha.p for example). ok thib@ after a lot of discussion and checking the semantics.