summaryrefslogtreecommitdiff
path: root/sys/uvm
AgeCommit message (Collapse)Author
2007-02-25Make integer wrap checks the same for mmap, munmap, msync, etcTodd C. Miller
by factoring most of the checks into a macro. OK otto@
2007-02-14Consistently spell FALLTHROUGH to appease lint.Jonathan Gray
ok kettenis@ cloder@ tom@ henning@
2007-02-12Let this compile with 'option DEBUG' again.Tom Cosgrove
ok dim@
2007-01-16Implement multiple segment allocation for uvm_pglistalloc, which fixesDimitry Andric
most agp_generic_bind_memory failures when memory is limited and very fragmented. In effect, this should fix a lot of X startup crashes after activities that exercise memory a lot (e.g. make builds, building big ports, etc). ok mickey, miod
2007-01-12proper define for MAX_KMAPENT; miod@ okMichael Shalayeff
2007-01-12Switch some lockmgr locks to rwlocks.Artur Grabowski
In this commit: - gdt lock on amd64 - sysctl lock - malloc sysctl lock - disk sysctl lock - swap syscall lock miod@, pedro@ ok (and "looks good" others@)
2006-11-29We don't use mb_map anymore since a long time already. Remove it.Miod Vallat
2006-11-29Remove cpu_swapin() and cpu_swapout(), they are no longer necessary (exceptMiod Vallat
for cpu_swapin() on hppa* which is kept).
2006-11-29Kernel stack can be swapped. This means that stuff that's on the stackMiod Vallat
should never be referenced outside the context of the process to which this stack belongs unless we do the PHOLD/PRELE dance. Loads of code doesn't follow the rules here. Instead of trying to track down all offenders and fix this hairy situation, it makes much more sense to not swap kernel stacks. From art@, tested by many some time ago.
2006-11-29Add an alignment parameter to uvm_km_alloc1(), and change all callers toMiod Vallat
pass zero; this will be used shortly. From art@
2006-10-03Introduce daddr64_t and use it for physical block numbersPedro Martelletto
Okay weingart@, "I'm game with putting my name on it" dlg@
2006-07-31fix uvmhist #2: args are always u_long so fix missing %d and %x and no %ll; ↵Michael Shalayeff
no change for normal code
2006-07-26fix fmts for UVMHIST_LOG() entries making it more useful on 64bit archs; ↵Michael Shalayeff
miod@ ok
2006-07-13Back out the anon change. Apparently it was tested by a few, but most ofTheo de Raadt
us did not see it or get a chance to test it before it was commited. It broke cvs, in the ami driver, making it not succeed at seeing it's devices.
2006-06-29fallout from previous: remmapping anonymous memory did not account dsize ↵Michael Shalayeff
proper; found by krause and mmap_fixed
2006-06-21from netbsd: make anons dynamically allocated from pool.Michael Shalayeff
this results in lesse kva waste due to static preallocation of those for every phys page and also every swap page. tested by beck krw miod
2006-06-16IS_VM_PHYSADDR is no longer used.Miod Vallat
2006-06-10Make uvn_sync_lock a rwlock, okay thib@ tedu@Pedro Martelletto
2006-06-01Make umv_pglistalloc() return EINVAL if it is asked for 0 bytes. ThisKenneth R Westerback
will prevent panics in, e.g., bus_dmamem_alloc(). ok jason@ art@
2006-05-25Enable optional specific handling of the u-area in pmap via PMAP_UAREA ifMiod Vallat
defined; from NetBSD. Currently only used on xscale arm to use the mini data cache for u area mappings instead of the main data cache.
2006-05-16tpyoMichael Shalayeff
2006-05-07remove drain hooks from pool.Ted Unangst
1. drain hooks and lists of allocators make the code complicated 2. the only hooks in the system are the mbuf reclaim routines 3. if reclaim is actually able to put a meaningful amount of memory back in the system, i think something else is dicked up. ie, if reclaiming your ip fragment buffers makes the difference thrashing swap and not, your system is in a load of trouble. 4. it's a scary amount of code running with very weird spl requirements and i'd say it's pretty much totally untested. raise your hand if your router is running at the edge of swap. 5. the reclaim stuff goes back to when mbufs lived in a tiny vm_map and you could run out of va. that's very unlikely (like impossible) now. ok/tested pedro krw sturm
2006-04-27from PAE work:Michael Shalayeff
as paddr_t could be a long long (soon) always cast and print as llx.
2006-04-27from PAE work:Michael Shalayeff
as freepages being vconverted back to byte address make sure to perform calculations in (upcoming) larger paddr_t to avoid losing higher bits in calculation.
2006-04-25limit pool backend preallocation to 2048 pages max (which only affects >2g ↵Michael Shalayeff
physmem); miod@ toby@ ok
2006-04-06Fix a process datasize leak with MAP_FIXED. When zapping old mappingsKurt Miller
call uvm_unmap_p instead of uvm_unmap so that it has the process information and can adjust vm_dused. okay pedro@ tedu@
2006-04-04Revert r1.58, I was on drugs - the array we are locking is one byte perMiod Vallat
page, so the arithmetic was ok. Spotted by david@
2006-03-16In sys_mincore(), pass a size in bytes, not pages, to uvm_vslock() andMiod Vallat
uvm_vsunlock(). ok mickey@
2006-03-06deal w/ uvm_km_alloc() returning null; tedu@ okMichael Shalayeff
2006-03-06do not panic unwiring unmapped memory (mmap3 regress); from netbsd; ↵Michael Shalayeff
kettenis@ tedu@ ok
2006-01-16add another uvm histroy for physpage alloc/free and propagate a debugging ↵Michael Shalayeff
pgfree check into pglist; no functional change for normal kernels; make histories uncommon
2006-01-02fix typo in commentTom Cosgrove
ok deraadt@
2005-12-10Don't check/free new_entry here, since it can't have been set. SpottedKenneth R Westerback
by lint. "Probably a bogus cut'n paste." says moid. ok miod@ pedro@
2005-12-10{en,re}trys -> {en,re}tries; eyeballed by jmc@Miod Vallat
2005-11-29apply patch from david hill for two netbsd prs:Ted Unangst
14060 skip MADV_SEQUENTIAL if refaulting 18037 missing pageactivate tested for some time by jolan krw
2005-11-25do not use any casting in the atop/ptoa; tested on all archs by martin@ ↵Michael Shalayeff
miod@ mickey@
2005-11-19Remove unnecessary lockmgr() archaism that was costing too much in termsPedro Martelletto
of panics and bugfixes. Access curproc directly, do not expect a process pointer as an argument. Should fix many "process context required" bugs. Incentive and okay millert@, okay marc@. Various testing, thanks.
2005-11-15Only two `h' in threshold.Miod Vallat
2005-11-04Add an extra flags argument to uvm_io(), to specify whether we want to fixMiod Vallat
the protection of the memory mapping we're doing I/O on, or if we want to leave them as they are. This should only be necessary for breakpoint insertion in code, so we'll only use it for ptrace requests. Initially from art@ after discussion with kettenis@ millert@ and I, tested by many.
2005-11-01In uvm_swapout(), protect "p->p_swtime = 0;" with SCHED_LOCK() as is alreadyAaron Campbell
done in uvm_swapin(). Looks like this was a mistake made while editing. No response from art@. deraadt@, miod@, pedro@ ok
2005-10-27Following a next pointer of an element deleted from a list is badOtto Moerbeek
practise. Depending on the list implementation, this might or might not work; so make it use a safe idiom. ok pedro@ millert@ deraadt@
2005-10-23typoPedro Martelletto
2005-10-06typoBrad Smith
2005-09-30revert MAX_KMAPENT hack added just before 3.7 now thatBrad Smith
a proper fix has been implemented in uvm_mapent_alloc(). ok pedro@
2005-09-30Make ddb's 'show uvmexp' print information about kmapent, okay deraadt@Pedro Martelletto
2005-09-28- when we run out of static kernel map entries, grab a fresh page usingPedro Martelletto
the uvm_km_page allocator and use it instead of calling panic() - add a counter to uvmexp so we can keep track of how many map entries we have in use idea from tedu@, long ago, okay deraadt@
2005-09-12Change the NKMEMPAGES range to 4-64MB for 32bit arches, and 8-128MB for 64bitMiod Vallat
arches; except on sparc where the range is 4-8 for !sun4m and 4-64 for sun4m, selected at runtime.
2005-09-09typosPedro Martelletto
2005-07-26 - Make a UVM_OBJ_IS_DEVICE macro.Artur Grabowski
- Use it to skip device mappings while dumping core. - Ignore EFAULT errors while dumping core since they can happen even for valid mappings. Just skip that part of the core file and let it get automagically zero-filled. This fixes the broken X core dumps that people have been seeing and also fixes some other potential problems that could prevent core dumps (mmaps beyond EOF, etc.). tedu@ ok
2005-06-29on the vax, start mmap BRKSIZ (8MB) into data seg; ok tdevalTheo de Raadt