summaryrefslogtreecommitdiff
path: root/sys/uvm
AgeCommit message (Collapse)Author
2014-11-21somebody permitted simple_locks back into uvm. they will be referred toTed Unangst
the bureau of party loyalty for reeducation.
2014-11-21Kill kv_executable flag. We no longer allow requests for PROT_EXECTheo de Raadt
mappings via this interface (nothing uses it, in any case) ok uebayasi tedu
2014-11-18Nuke yet more obvious #include duplications.Kenneth R Westerback
ok miod@
2014-11-18move arc4random prototype to systm.h. more appropriate for most codeTed Unangst
to include that than rdnvar.h. ok deraadt dlg
2014-11-17More cases of kernel map entries being created as EXEC by default; notTheo de Raadt
just the base permission but the maxprot as well. ok tedu
2014-11-17There is no reason for uvm_km_alloc1() to allocate kernel memoryTheo de Raadt
that is executable. ok tedu kettenis guenther
2014-11-17instead of PROT_MASK, use PROT_READ | PROT_WRITE | PROT_EXEC toTheo de Raadt
show the maxprot available in obreak mappings. (the default remains PROT_READ | PROT_WRITE, so don't be afraid). ok tedu
2014-11-17convert a copystr to strlcpy.Ted Unangst
rearrange things in mountswap to delay malloc and always allocate needed size.
2014-11-16Replace a plethora of historical protection options with justTheo de Raadt
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
2014-11-15repair operator precedence in UVM_MAPFLAG() macro; ok teduTheo de Raadt
2014-11-13sizes for simple frees. new diff without the bug spotted by deraadtTed Unangst
2014-11-13bzero -> memsetTed Unangst
2014-10-25Display uvmexp.zeropages in ddb's `show uvmexp' command.Miod Vallat
2014-10-03Initialize uvm_pagezero_thread()'s page list variable.Philip Guenther
ok krw@ sthen@
2014-10-03Introduce a thread for zeroing pages without holding the kernel lock. ThisMark Kettenis
way we can do some useful kernel lock in parallel with other things and create a reservoir of zeroed pages ready for use elsewhere. This should reduce latency. The thread runs at the absolutel lowest priority such that we don't keep other kernel threads or userland from doing useful work. Can be easily disabled by disabling the kthread_create(9) call in main(). Which perhaps we should do for non-MP kernels. ok deraadt@, tedu@
2014-10-03Introduce __MAP_NOFAULT, a mmap(2) flag that makes sure a mapping will notMark Kettenis
cause a SIGSEGV or SIGBUS when a mapped file gets truncated. Access to pages that are not backed by a file on such a mapping will be replaced by zero-filled anonymous pages. Makes passing file descriptors of mapped files usable without having to play tricks with signal handlers. "steal your mmap flag" deraadt@
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-09-09Make the cleaner, syncer, pagedaemon, aiodone daemons allBret Lambert
yield() if the cpu is marked SHOULDYIELD. ok miod@ tedu@ phessler@
2014-09-08Don't sleep on allocation of hash table entries. Should fix crashes peopleMark Kettenis
have been seeing with tmpfs. Based on a similar fix from Bitrig by Owain Ainsworth. ok jsg@
2014-09-07typo in commentPhilip Guenther
2014-08-14Bring back 1.173 (reverting 1.174) - mips64 systems are still unhappy whenMiod Vallat
the hint returned is over VM_MAXUSER_ADDRESS, apparently; better be safe for now while this is investigated further.
2014-08-12Revert 1.173 now that the real cause of the octeon regression has been fixed.Miod Vallat
2014-07-13Fall back to smaller spacing on the mips64 machines.Paul Irofti
Please spare some change for the mips64 memory-challenged machines.. Some change, Sir? Fixes at least the octeon platform. Found the hardway on my DSR500. Found by Boss tedu@ and Boss deraadt@ Okay Boss miod@
2014-07-13more mmap random on 64-bit platforms. noticed in freebsd aslr patches.Ted Unangst
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-12Add a function to drop all clean pages on the page daemon queues and callMark Kettenis
it when we hibernate. ok mlarkin@, miod@, deraadt@
2014-07-11Chuck Cranor rescinded clauses in his licenseJonathan Gray
on the 2nd of February 2011 in NetBSD. http://marc.info/?l=netbsd-source-changes&m=129658899212732&w=2 http://marc.info/?l=netbsd-source-changes&m=129659095515558&w=2 http://marc.info/?l=netbsd-source-changes&m=129659157916514&w=2 http://marc.info/?l=netbsd-source-changes&m=129665962324372&w=2 http://marc.info/?l=netbsd-source-changes&m=129666033625342&w=2 http://marc.info/?l=netbsd-source-changes&m=129666052825545&w=2 http://marc.info/?l=netbsd-source-changes&m=129666922906480&w=2 http://marc.info/?l=netbsd-source-changes&m=129667725518082&w=2
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2014-07-08white space repairsTheo de Raadt
2014-07-08rearrange some includes. also, pull in uvm/uvm.h because soon sysctl.hTheo de Raadt
won't be pulling in the uvm side of the kitchen.
2014-07-08the #ifdef _KERNEL can wrap the entire file. uvm_extern.h only pullsTheo de Raadt
this inside #ifdef _KERNEL in any case, so nothing really changes.
2014-07-08subtle rearrangement of includesTheo de Raadt
2014-07-08bye bye UBC; ok beck dlgTheo de Raadt
2014-07-03It is important that we don't release the kernel lock between issuing aMark Kettenis
wakeup and clearing the PG_BUSY and PG_WANTED flags, so try to keep those bits as close together and defenitely avoid calling random code in between. ok guenther@, tedu@
2014-07-02Use real parameter types for u{dv,vn}_attach() instead of void *Matthew Dempsky
ok guenther
2014-06-29delete a #ifdef _KERNEL chunk protecting userland from an #if 0 chunkTheo de Raadt
2014-06-27Cleanup support for legacy mmap flagsMatthew Dempsky
Move all legacy MAP_FOO values behind #ifndef _KERNEL and redefine them to either be aliases for existing flags (e.g., MAP_COPY -> MAP_PRIVATE) or 0. Also, add MAP_OLDFOO defines (behind #ifndef _KERNEL) so the kernel and kdump can remain compatible with current OpenBSD binaries. ok deraadt
2014-06-21Make sure kmthread never loops without making progress: if the freelistPhilip Guenther
was empty then the first page allocation should sleep until it can get one. ok tedu@
2014-06-13Add support for MAP_INHERIT_ZERO.Matthew Dempsky
This provides a way for a process to designate pages in its address space that should be replaced by fresh, zero-initialized anonymous memory in forked child processes, rather than being copied or shared. ok jmc, kettenis, tedu, deraadt; positive feedback from many more
2014-06-10KNFMark Kettenis
2014-05-15Move from struct proc to process the reference-count-holding pointersPhilip Guenther
to the process's vmspace and filedescs. struct proc continues to keep copies of the pointers, copying them on fork, clearing them on exit, and (for vmspace) refreshing on exec. Also, make uvm_swapout_threads() thread aware, eliminating p_swtime in kernel. particular testing by ajacoutot@ and sebastia@
2014-05-09stop using B_AGE, it was effectively retired some time ago.Ted Unangst
2014-05-08Fix some potential integer overflows caused by converting a page number intoMark Kettenis
an offset/size/address by shifting by PAGE_SHIFT. Make uvm_objwrire/unwire use voff_t instead of off_t. The former is the right type here even if it is equivalent to the latter. Inspired by a somewhat similar changes in Bitrig. ok deraadt@, guenther@
2014-05-06Include <sys/vmmeter.h> directly instead of relying on it beingMartin Pieuchot
pulled by <uvm/uvm_extern.h> and turn uvm_total() into a private function. The preferred way to get memory stats is through the VM_UVMEXP sysctl(3) since VM_METER is just a wrapper on top of it. In the kernel, use `uvmexp' directly instead of uvm_total(). This change does not remove <sys/vmmeter.h> from <uvm/uvm_extern.h> to give some more time to port maintainers to fix their ports. ok guenther@ as part of a larger diff.
2014-05-03Fix whitespace fail in previous commitPhilip Guenther
2014-05-03Move the u-area allocation and pmap-magic logic to its own functionPhilip Guenther
uvm_uarea_alloc() function name from NetBSD; arm testing by miod@
2014-04-30Make sure we flush discarded pages even if the number of hash buckets doesn'tMark Kettenis
change. From Pedro Martelletto via bitrig. ok beck@, krw@
2014-04-30Assigning list pointers doesn't really work with doubly linked lists. UseMark Kettenis
a remove-and-insert-all-items approach for now and remove the comments that suggest manipulating list pointers. Pointed out by Pedro Martelletto. ok beck@, krw@, mikeb@
2014-04-29Replace 1 << PAGE_SHIFT with PAGE_SIZE.Mark Kettenis
ok beck@, miod@
2014-04-13compress code by turning four line comments into one line comments.Ted Unangst
emphatic ok usual suspects, grudging ok miod