summaryrefslogtreecommitdiff
path: root/sys/uvm
AgeCommit message (Collapse)Author
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.
2011-05-10Kill vm_page_lookup_freelist.Owain Ainsworth
it belongs to a world order that isn't here anymore. More importantly it has been unused for a fair while now. ok thib@
2011-05-07Uvm Anonymous Objects depending on size either use an array or aOwain Ainsworth
hashtable to keep the list of swap slots in use in. Only one of these will be in use at any one tmie, so shave some bytes and make it a union. ok thib@
2011-05-07So long, uvm_pglist.hOwain Ainsworth
This header defined three thing. two of which are unused throughout the tree, the final one was the definition of the pagq head type, move that to uvm_page.h and nuke the header ok thib@. Thanks to krw@ for testing the hppa build for me.
2011-04-26MMU address space holes are at a fixed position (ofcourse).Ariane van der Steldt
Therefore set UVM_FLAG_FIXED and enforce this. ok oga@
2011-04-23Fix management of the list of free uvm_km_pages. Seems art@ lost a lineMark Kettenis
when he copied this code from uvm_km_putpage() into km_free(). Found independently by ariane@; ok deraadt@
2011-04-19Add missing call to pmap_update() in km_alloc().Matthew Dempsky
ok deraadt@, miod@
2011-04-19Free the correct pages when we failed to allocate va.Artur Grabowski
2011-04-18Put back the change of pool and malloc into the new km_alloc(9) api.Artur Grabowski
The problems during the hackathon were not caused by this (most likely). prodded by deraadt@ and beck@
2011-04-17construct a better path to the swapdevice (as seen in pstat/swapctl output)Theo de Raadt
ok miod
2011-04-15unused variable on !PMAP_DIRECTTheo de Raadt
2011-04-15for uvm_pager_dropcluster in the PG_RELEASED case we specifically unbusy theOwain Ainsworth
page so that um_anfree will free it for us. uvm_anfree does a pmap_page_protect(, VM_PROT_NONE) just before it frees the page, so we don't need to do it here ourselves. ok ariane@
2011-04-15move uvm_pageratop from uvm_pager.c local to a general uvm functionOwain Ainsworth
(uvm_atopg) and use it in uvm_km_doputpage to replace some handrolled code. Shrinks the kernel a trivial amount. ok beck@ and miod@ (who suggested i name it uvm_atopg not uvm_atop)