summaryrefslogtreecommitdiffstats
path: root/sys/uvm/uvm_pdaemon.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* The use of uvm.pagedaemon_lock is incredibly inconsistent. only aoga2009-04-141-22/+13
| | | | | | | | | | | | | | fraction of the wakeups and sleeps involved here actually grab that lock. The remainder, on the other hand, always have the fpageq_lock locked. So, make this locking correct by switching the other users over to fpageq_lock, too. This would probably be better off being a semaphore, but for now at least it's correct. "ok, unless you want to implement semaphores" art@
* Convert the page queue lock to a mutex instead of a simplelock.oga2009-04-131-12/+4
| | | | | | | | Fix up the one case of lock recursion (which blatantly ignored the comment right above it saying that we don't need to lock). The rest of the lock usage has been checked and appears to be correct. ok ariane@.
* Instead of doing splbio(); simple_lock(&uvm.aiodoned_lock); just replaceoga2009-04-061-28/+10
| | | | | | | the simple lock with a real lock - a IPL_BIO mutex. While i'm here, make the sleeping condition one hell of a lot simpler in the aio daemon. some ideas from and ok art@.
* While working on some stuff in uvm I've gotten REALLY sick of readingoga2009-03-201-5/+3
| | | | | | | K&R function declarations, so switch them all over to ansi-style, in accordance with the prophesy. "go for it" art@
* Register aiodoned_proc, although it is not used anywhere yet; PR #6034miod2009-01-121-1/+3
|
* Make the pagedaemon a bit happier.art2008-07-021-17/+10
| | | | | | | | | | | | | | | | | | | | | | | 1. When checking if the pagedaemon should be awakened and to see how much work it should do, consider the buffer cache deficit (how much pages the buffer cache can eat max vs. how much it has now) as pages that are not free. They are actually still usable by the allocator, but the presure on the pagedaemon is increased when we starting to chew into the memory that the buffer cache wants to use. 2. Remove the stupid 512kB limit of how much memory should be our free target. That maybe made sense on 68k, but on modern systems 512k is just a joke. Keep it at 3% of physical memory just like it was meant to be. 3. When doing allocations for the pagedaemon, always let it use the reserve. the whole UVM_OBJ_IS_KERN_OBJECT is silly and doesn't work in most cases anyway. We still don't have a reserve for the pagedaemon in the km_page allocator, but this seems to help enough. (yes, there are still bad cases in that code and the comment is only half-true, the whole section needs a massage, but that will happen later, this diff only touches pagedaemon parts) Testing by many, prodded by theo.
* Turn the uvm_{lock/unlock}_fpageq() inlines intothib2007-12-181-9/+9
| | | | | | | macros that just expand into the mutex functions to keep the abstraction, do assorted cleanup. ok miod@,art@
* Bring back Mickey's UVM anon change. Testing by thib@, beck@ andpedro2007-06-181-3/+3
| | | | ckuethe@ for a while. Okay beck@, "it is good timing" deraadt@.
* While splitting flags and pqflags might have been a good idea in theoryart2007-04-131-25/+30
| | | | | | | | | | | | to separate locking, on most modern machines this is not enough since operations on short types touch other short types that share the same word in memory. Merge pg_flags and pqflags again and now use atomic operations to change the flags. Also bump wire_count to an int and pg_version might go int as well, just for alignment. tested by many, many. ok miod@
* Mechanically rename the "flags" and "version" fields in struct vm_pageart2007-04-041-14/+14
| | | | | | | | | | to "pg_flags" and "pg_version", so that they are a bit easier to work with. Whoever uses generic names like this for a popular struct obviously doesn't read much code. Most architectures compile and there are no functionality changes. deraadt@ ok ("if something fails to compile, we fix that by hand")
* fix uvmhist #2: args are always u_long so fix missing %d and %x and no %ll; no change for normal codemickey2006-07-311-5/+5
|
* Back out the anon change. Apparently it was tested by a few, but most ofderaadt2006-07-131-3/+3
| | | | | 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.
* from netbsd: make anons dynamically allocated from pool.mickey2006-06-211-3/+3
| | | | | | 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
* tpyomickey2006-05-161-2/+2
|
* remove drain hooks from pool.tedu2006-05-071-4/+1
| | | | | | | | | | | | | | | 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
* Make sure that b_iodone handlers are called at splbio (and splassert(IPL_BIO) in all known callers, just to make sure).art2002-05-241-1/+3
|
* First round of __P removal in sysmillert2002-03-141-4/+4
|
* spellingderaadt2002-02-101-2/+2
|
* Back out a few more uvm changes, especially wrt swap usage.miod2002-01-021-51/+37
| | | | | | | This unbreaks m68k m88k sparc and perhaps others, which eventually froze when hitting swap. Tested by various people on various platforms. ok art@
* UBC was a disaster. It worked very good when it worked, but on someart2001-12-191-40/+188
| | | | | | | | | 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.
* Sync in more uvm from NetBSD. Mostly just cosmetic stuff.art2001-11-281-33/+28
| | | | Contains also support for page coloring.
* Sync in more uvm changes from NetBSD.art2001-11-281-157/+14
| | | | | This time we're getting rid of KERN_* and VM_PAGER_* error codes and use errnos instead.
* Bring in more changes from NetBSD. Mostly pagedaemon improvements.art2001-11-121-90/+96
|
* Merge in some parts of the ubc work that has been done in NetBSD that are notart2001-11-101-148/+164
| | | | | | | | | | UBC, but prerequsites for it. - Create a daemon that processes async I/O (swap and paging in the future) requests that need processing in process context and that were processed in the pagedaemon before. - Convert some ugly ifdef DIAGNOSTIC code to less intrusive KASSERTs. - misc other cleanups.
* More sync to NetBSD.art2001-11-061-3/+7
| | | | | | - 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.
* Move the last content from vm/ to uvm/art2001-11-061-4/+2
| | | | | | | 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
* Minor sync to NetBSD.art2001-11-051-3/+2
|
* Don't include <vm/vm_kern.h> if you don't need foo_map.miod2001-09-111-2/+1
|
* Various random fixes from NetBSD.art2001-08-111-2/+2
| | | | Including support for zeroing pages in the idle loop (not enabled yet).
* Make uvm_wait take a const char *art2001-07-181-3/+3
|
* Get rid of the PMAP_NEW option by making it mandatory for all archs.art2001-07-181-11/+10
| | | | | The archs that didn't have a proper PMAP_NEW now have a dummy implementation with wrappers around the old functions.
* Sync style, typo, and comments a little closer to NetBSD. art@ oksmart2001-03-221-2/+3
|
* Replace thread_wakeup() with wakeup(). It is defined in vm_extern.h as asmart2001-03-081-5/+5
| | | | | wrapper, so this removes a dependence on the old VM system. From NetBSD. art@ ok
* $OpenBSD$niklas2001-01-291-0/+1
|
* seperate -> separate, okay aaron@provos2000-11-101-1/+1
|
* Bring in some new UVM code from NetBSD (not current).art2000-03-161-9/+5
| | | | | | | | | - Introduce a new type of map that are interrupt safe and never allow faults in them. mb_map and kmem_map are made intrsafe. - Add "access protection" to uvm_vslock (to be passed down to uvm_fault and later to pmap_enter). - madvise(2) now works. - various cleanups.
* swap encryption for UVM, option UVM_SWAP_ENCRYPT. needs to be enabledprovos1999-12-301-3/+3
| | | | | | | | | | via sysctl. Pages are encrypted with the Blowfish encryption algorithm, the key is initialized randomly on first swap out, ensuring that entropy has accumulated in the kernel randomness pool. Eventually, swap encryption will be decided on a process by process basis, e.g. a process that reads from a cryptographic filesystem will enable swap encrypt for its pages. okay art@ and deraadt@.
* sync with NetBSD from 1999.05.24 (there is a reason for this date)art1999-08-231-41/+137
| | | | | Mostly cleanups, but also a few improvements to pagedaemon for better handling of low memory and/or low swap conditions.
* add OpenBSD tagsart1999-02-261-0/+1
|
* Import of uvm from NetBSD. Some local changes, some code disabledart1999-02-261-0/+1012