summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_pool.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove more '\n's from panic() statements. Both trailing and leading.krw2002-10-121-4/+4
| | | | Diff generated by Chris Kuethe.
* Fix yet another braino.art2002-07-231-2/+11
| | | | | | | | Just because the pool allocates from intrsafe memory doesn't mean that the pool has to be protected by splvm. We can have an intrsafe pools at splbio or splsoftnet. pool_page_alloc and pool_page_free must du their own splvm protection.
* Please tell me what crack I've been smoking when I did that.art2002-07-231-7/+7
| | | | | | When trying the drain hook just in pool_allocator_alloc, don't leak memory when the drain succeeds and don't avoid draining other pools if this pool doesn't have a drain hook.
* different magics for malloc and pool, art@ okniklas2002-06-091-2/+2
|
* Whoops. missing simple_unlock.art2002-03-141-1/+2
| | | | From thorpej@netbsd.org
* Make pool_sethardlimit() check that it doesn't decrease the limit belowdhartmei2002-02-251-5/+14
| | | | the current size of the pool. ok art@
* Move out draining of the allocator to an own function andart2002-02-231-38/+54
| | | | let other parts of the kernel call it.
* If the allocator has the PA_WANT flag set, return whole pages immediately.art2002-02-231-2/+3
|
* Fix up some functions. Don't have static all over the placeart2002-02-231-14/+17
| | | | | and don't static inline big functions that are called multiple times and are not time critical.
* Honor the printf-like function argument in pool_printit(), instead ofmiod2002-01-291-3/+3
| | | | using printf(). Makes ddb sessions more fruitful.
* GC PR_STATIC and PR_MALLOCOK.art2002-01-281-26/+4
| | | | | PR_MALLOC wasn't used at all in the code and PR_STATIC was missing pieces and should be solved with allocators.
* Add a drain hook to each pool. This hook is called in three cases.art2002-01-251-2/+52
| | | | | | | | | | | | 1. When a pool hit the hard limit. Just before bailing out/sleeping. 2. When an allocator fails to allocate memory (with PR_NOWAIT). 3. Just before trying to reclaim some page in pool_reclaim. The function called form the hook should try to free some items to the pool if possible. Convert m_reclaim hooks that were embedded in MCLGET, MGET and MGETHDR into a pool drain hook (making the code much cleaner).
* Kill PR_FREEHEADER, not used anymore and confusing.art2002-01-231-4/+1
|
* Pool deals fairly well with physical memory shortage, but it doesn't dealart2002-01-231-102/+206
| | | | | | | | | | | | | | | | | | 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.
* Fix a locking error in pool_drain. Misc cleanup.art2002-01-101-30/+63
| | | | From NetBSD.
* - unbreak POOL_DIAGNOSTIC.art2002-01-101-10/+5
| | | | - use ltsleep instead of simple_unlock ; tsleep
* No more need for local define of LOCK_ASSERT.art2002-01-101-2/+1
|
* Protect the pool cache magazine pool with splvm.art2002-01-101-1/+7
|
* Convert some for-loops into TAILQ_FOREACH.art2002-01-101-22/+11
|
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-2/+1
| | | | (Look ma, I might have broken the tree)
* merge vm/vm_kern.h into uvm/uvm_extern.h; art@ okmickey2001-09-191-3/+1
|
* We now have predict_{true,false}art2001-08-071-3/+1
|
* (define simple_lock_only_held): add dummy nop macroassar2001-07-151-1/+2
|
* remove old vmart2001-06-271-31/+1
|
* No need to define splvm() here anymore.miod2001-06-241-2/+1
| | | | art@ ok
* Add a sysctl for getting pool information out of the kernel.art2001-06-241-10/+69
|
* ooops. remove unfinished work in progress.art2001-06-231-5/+3
|
* Bring in a bunch of improvements from NetBSD.art2001-06-231-268/+548
| | | | | | | - pool_cache similar to the slab allocator in Solaris. - clean up locking a bit. - Don't pass __LINE__ and __FILE__ to pool_get and pool_put unless POOL_DIAGNOSTIC is defined.
* Ok, I'm breaking my promise. I promised to not do anything with theart2001-03-211-2/+31
| | | | | | | old vm system and I hoped that it would make people help me to switch all archs to uvm. But that didn't help. Fix pool to work with the old vm system (not optimal, ha!).
* Fix LOCKDEBUG compile.art2001-02-191-1/+4
|
* Bring in fresh pool from NetBSD. Some improvements and fixes.art2000-12-051-185/+659
|
* Pool will not work with old vm and is only used by uvm. Remove non-uvm code.art1999-11-111-22/+1
|
* pool allocator from NetBSD (stays until uvm is ready)art1999-02-261-0/+1092