summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_map.c
AgeCommit message (Collapse)Author
2004-12-30Import M_CANFAIL support from NetBSD, removes a nasty panic during low-mem ↵Niklas Hallqvist
scenarios, instead generating an ENOMEM backfeed, ok tedu@, prodded by many
2004-08-06rename sparc kill_user_windows() to pmap_unuse_final(). provide empty stubsTheo de Raadt
on all other architectures. remove last architecture dependent #ifdef from uvm code.
2004-07-21Yet another victim of inline masturbation.Artur Grabowski
Remove inline from a few functions, shrink the kernel by a few kB and make things faster. A simple compilation on amd64 spends around 5% less time in kernel. Yes, it's faster without inlines, now go buy a book about modern cpu architectures and find a chapter about the new and revolutionary thing called "cache". deraadt@ ok
2004-05-30only free pages if we have write permission and they are not COW.Ted Unangst
prevents msync/madvise funniness from art@ ok deraadt@
2004-05-03protecing with NONE means we must drop the wired count.Ted Unangst
solves problems encountered by david@ and dtucker@ (pr3758)
2004-02-23sync of pmap_update() calls with NetBSD. pmap_update is defined away onDale Rahn
all architectures but arm, where it is needed.
2003-11-18faster pools. split pagelist into full, partial, and empty so we find whatTed Unangst
we're looking for. change small page_header hash table to a splay tree. from Chuck Silvers. tested by brad grange henning mcbride naddy otto
2003-10-08randomize return from uvm_map_hint. the random increment is limitedTed Unangst
to prevent fragmentation. this has the effect of randomizing unhinted mmap()s, sysV mem, and position of ld.so. tested on many archs by many developers for quite some time. use of MIN to allow m68k to play from miod@. vax is not included. ok deraadt@ miod@
2003-09-03m68k at least doesn't like random mappings. disable for now.Ted Unangst
i386 exec mappings are still random. detected by pvalchev@. ok deraadt@
2003-09-02add a random offset to uvm_map_hint. this has the primary effect ofTed Unangst
scattering ld.so and libraries around, although all mmaps will also have some jitter too. better version after some discussion with drahn testing/ok deraadt henning marcm otto pb
2003-06-29quell a "not a pointer" warning by using 0x%lx instead of %p for a vaddr_tAnil Madhavapeddy
suggested by art@
2003-05-05Move exec base to 0x1c000000, exe/data gap to 512MB. Allows betterDale Rahn
interleave of exe/shared libs. Raise MAXDSIZ back to 1G. This change REQUIRES a binary update on i386.
2003-04-17changes to support mquery with 1Gsep on i386. avoid heap on mappings.Dale Rahn
2003-04-14There are two related changes.Artur Grabowski
The first one is an mquery(2) syscall. It's for asking the VM system about where to map things. It will be used by ld.so, read the man page for details. The second change is related and is a centralization of uvm_map hint that all callers of uvm_map calculated. This will allow us to adjust this hint on architectures that have segments for non-exec mappings. deraadt@ drahn@ ok.
2002-12-09Two splasserts in map entry allocation.Artur Grabowski
2002-10-29Since memory deallocation can't fail, remove the error return fromArtur Grabowski
uvm_unmap, uvm_deallocate and a few other functions. Simplifies some code and reduces diff to the UBC branch.
2002-10-29"len = entry->end - entry->start;" then logically "entry->start + len"Artur Grabowski
should be equal to "entry->end". (len is never changed)
2002-10-17 - name in uvm_tree_sanity must be const.Artur Grabowski
- fix a typo in comment. - enable uvm_tree_sanity ifdef DEBUG
2002-09-17int is small for returned values from uvm_rb_{space,subtree_space}, useMike Pechkin
vsize_t instead. art@ ok
2002-08-30__FUNCTION__ -> __func__ that I forgot to commit.Marc Espie
2002-08-20print as unsigned for unsigned values, when printing out a map in ddb; art@ okMichael Shalayeff
2002-07-23Now that sparc64 implements reverse splassert, it make senseArtur Grabowski
to add splassert(IPL_NONE) in a few strategic places.
2002-06-14spelling; from Brian Poole <raj@cerias.purdue.edu>Todd T. Fries
2002-06-05DIAGNOSTIC check for duplicate entry into the tree.Artur Grabowski
niels@ ok.
2002-04-29wierd -> weirdPeter Valchev
2002-03-14Final __P removal plus some cosmetic fixupsTodd C. Miller
2002-03-14First round of __P removal in sysTodd C. Miller
2002-03-08semicolon is not always what it seems, replace w/ a \n in asm labelsMichael Shalayeff
2002-03-07use an augmented red-black tree to keep track of free space in the vm_map.Niels Provos
uvm_tree_sanity is left as debugging help but needs to be enabled manually. okay art@
2002-02-28use red-black tree for lookup_entry. the red-black tree case forNiels Provos
map_findspace is still broken on alpha. this will make debugging easier. okay millert@
2002-02-25back out red-black tree. they are very fast but alpha UVM is broken andNiels Provos
the tree triggers the bug, PMAP_PREFER case was broken also.
2002-02-25use a red-black tree to find entries in the vm_map. augment the red-blackNiels Provos
tree to find free space between entries. speeds up memory allocation, etc...
2002-02-18From the UBC branch and NetBSD.Artur Grabowski
We allocate map entries for the non-intrsafe kernel map (most notably kernel_map and exec_map) from a pool that's backed by kmem_map (to avoid deadlocking). This should get rid of MAX_KMAPENT panics.
2002-01-23Pool deals fairly well with physical memory shortage, but it doesn't dealArtur Grabowski
well (not at all) with shortages of the vm_map where the pages are mapped (usually kmem_map). Try to deal with it: - group all information the backend allocator for a pool in a separate struct. The pool will only have a pointer to that struct. - change the pool_init API to reflect that. - link all pools allocating from the same allocator on a linked list. - Since an allocator is responsible to wait for physical memory it will only fail (waitok) when it runs out of its backing vm_map, carefully drain pools using the same allocator so that va space is freed. (see comments in code for caveats and details). - change pool_reclaim to return if it actually succeeded to free some memory, use that information to make draining easier and more efficient. - get rid of PR_URGENT, noone uses it.
2002-01-02Back out a few more uvm changes, especially wrt swap usage.Miod Vallat
This unbreaks m68k m88k sparc and perhaps others, which eventually froze when hitting swap. Tested by various people on various platforms. ok art@
2001-12-19UBC was a disaster. It worked very good when it worked, but on someArtur Grabowski
machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
2001-12-04Yet another sync to NetBSD uvm.Artur Grabowski
Today we add a pmap argument to pmap_update() and allocate map entries for kernel_map from kmem_map instead of using the static entries. This should get rid of MAX_KMAPENT panics. Also some uvm_loan problems are fixed.
2001-11-28Sync in more uvm from NetBSD. Mostly just cosmetic stuff.Artur Grabowski
Contains also support for page coloring.
2001-11-28Sync in more uvm changes from NetBSD.Artur Grabowski
This time we're getting rid of KERN_* and VM_PAGER_* error codes and use errnos instead.
2001-11-12Bring in more changes from NetBSD. Mostly pagedaemon improvements.Artur Grabowski
2001-11-09minor sync to NetBSD.Artur Grabowski
2001-11-07Another sync of uvm to NetBSD. Just minor fiddling, no major changes.Artur Grabowski
2001-11-07Add an alignment argument to uvm_map that specifies an alignment hintArtur Grabowski
for the virtual address.
2001-11-06More sync to NetBSD.Artur Grabowski
- Use malloc/free instead of MALLOC/FREE for variable sized allocations. - Move the memory inheritance code to sys/mman.h and rename from VM_* to MAP_* - various cleanups and simplifications.
2001-11-06Move the last content from vm/ to uvm/Artur Grabowski
The only thing left in vm/ are just dumb wrappers. vm/vm.h includes uvm/uvm_extern.h vm/pmap.h includes uvm/uvm_pmap.h vm/vm_page.h includes uvm/uvm_page.h
2001-11-05Minor sync to NetBSD.Artur Grabowski
2001-09-19merge vm/vm_kern.h into uvm/uvm_extern.h; art@ okMichael Shalayeff
2001-08-11Various random fixes from NetBSD.Artur Grabowski
Including support for zeroing pages in the idle loop (not enabled yet).
2001-08-06Add a new type voff_t (right now it's typedefed as off_t) used for offsetsArtur Grabowski
into objects. Gives the possibilty to mmap beyond the size of vaddr_t. From NetBSD.
2001-07-18Correct the NetBSD tag.Artur Grabowski