summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_extent.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* use __func__ where possible. shaves 4k and makes indentation much better.fgsch2011-01-051-58/+55
| | | | kettenis@ ok
* explicitly specify flags to malloc and pool_get instead of relying on 0.tedu2010-07-031-2/+3
| | | | | This is more clear, and as thib pointed out, the default in softraid was wrong. ok thib.
* Add some missing includes, so we do not have implicit functionphessler2010-06-201-1/+2
| | | | | | declarations. OK miod@, millert@
* fix typos in comments, no code changes;schwarze2010-01-141-3/+3
| | | | | from Brad Tilley <brad at 16systems dot com>; ok oga@
* Make sure we do not loop when allocating an extent region with EX_CONFLICTOKmiod2009-10-131-7/+11
| | | | | | | and the whole extent is used; the current code computations would wrap. Found the hard way by jsg@, fix discuss with kettenis@, and you get a regress test for free (which will spin if you compile it again an old subr_extent.c)
* Make sure we handle all possible ways regions can overlap when EX_CONFLICTOKkettenis2009-09-181-9/+26
| | | | | | is specified. ok miod@
* Fix userland regression tests by providing a #define for pool_setipl()oga2009-06-091-2/+2
| | | | | | (just a noop since that doesn't matter in userland). Pointed out by a couple of people, thanks.
* don't use splvm ourselves, use pool_setipl on the pool we're allocatingoga2009-06-041-11/+2
| | | | | | from and it will do it for us. ok miod@
* Add a new EX_FILLED flag to make extent_create() create an extent map thatkettenis2009-04-191-1/+13
| | | | | | has all space allocated such that we can make holes in it using extent_free(). ok miod@
* Add EX_CONFLICTOK flag that allows an allocation to conflict with existingkettenis2009-04-101-1/+34
| | | | | | allocations, making sure that the union of all space is allocated. ok deraadt@
* Make extent_print() use printf to avoid the pagination that db_printfkettenis2009-04-041-9/+17
| | | | | provides, while keeping this behaviour for extent_print_all() which is only called by ddb. Based on a diff from deraadt@.
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* In extent_destroy(), only remove the extent from the global extent list ifmiod2006-06-041-1/+3
| | | | the list is really used, i.e. if option DIAGNOSTIC || option DDB.
* Turn EXTENT_ALIGN into an inline function; shaves about 50 to 100 bytesmiod2006-03-161-9/+12
| | | | on RISC arches, but m68k loses a few bytes; ok deraadt@
* Remove unused extent_find(). Then, we can keep the extent list only ifmiod2006-02-231-22/+6
| | | | option DIAGNOSTIC || option DDB, saves some room on installation media.
* ansi and deregister. No binary change.jsg2005-12-091-38/+15
|
* Remove unused extent_insert_and_optimize() parameter 'flags'. Spottedkrw2005-07-081-6/+5
| | | | | | by lint. ok art@ miod@
* Correctly handle allocations of size 1 at an extent boundary; from NetBSD.miod2005-04-211-3/+3
|
* Make the non-_KERNEL compilation usable again, in order to add a regress test.miod2005-04-211-3/+14
|
* Use list and queue macros where applicable to make the code easier to read;miod2004-12-261-22/+19
| | | | no change in compiler assembly output.
* compile non-DIAGNOSTIC kernelsderaadt2002-12-081-1/+3
|
* - Use LIST_ macros.art2002-12-081-10/+17
| | | | - Make sure that extent_register is not called more than once on an extent.
* Use %b and print the bitmask of the flags in the debugging message for the extent.jason2002-06-281-3/+3
|
* splvm, not splimp.art2002-06-111-4/+4
|
* Two patches from NetBSD:jason2002-03-211-16/+25
| | | | | | | | | - extent_alloc_subregion shouldn't allocate a region pasts the end of subregion. - extent_alloc_subregion1(): when a candidate region doesn't fit after being rounded up to respect boundary limits, adjust newstart and last before skiping to the next region. Otherwise we may check the same candidate region against the start of the next region, no the one immediatly following the hole, leading to corrupted map.
* First round of __P removal in sysmillert2002-03-141-8/+7
|
* Pool deals fairly well with physical memory shortage, but it doesn't dealart2002-01-231-2/+2
| | | | | | | | | | | | | | | | | | 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.
* Use pool to allocate extent region descriptors.art2001-08-061-7/+29
|
* In extent_destroy, remove the extent from the list ofart2001-07-261-1/+4
| | | | all extents.
* Get rid of the wrapper macros around extent_alloc*1art2001-07-051-2/+2
| | | | Pass the right amount of arguments and rename them back to their right names.
* KNFderaadt2001-06-221-6/+7
|
* correct 1 printf.fgsch2001-05-081-3/+3
|
* In extent_alloc_subregion1, be sure that the region returned don't runfgsch2001-05-081-1/+8
| | | | past the end of the subregion; art@ok, deraadt@ok.
* do not call extent_print() unless DDB || DIAGNOSTICderaadt2001-01-171-1/+3
|
* update from netbsd:jason2001-01-151-73/+124
| | | | several fixes with regards to boundary cases and other fixes
* Off by one in a validity checkniklas2000-09-201-2/+2
|
* prevent overflow in a diagnostic check; art@ okmickey2000-03-151-2/+2
|
* Add another argument to extent_alloc_subregion to allow specifing an offsetart2000-02-151-8/+9
| | | | | | to the alignment. rename the function to extent_alloc_subregion1 and add compatibility macros. From NetBSD.
* Always check that the start of our candidate region is within thefgsch1999-02-171-1/+8
| | | | bounds of "substart" and "subend".
* Adhere better to DIAGNOSTIC and DDB optionsniklas1999-01-111-2/+7
|
* Fix a serious bug in extent_alloc_subregion where the subregion startfgsch1998-10-011-1/+20
| | | | was ignored. This fix some problems in the pcmcia framework.
* Add command to print out extents. This helps in debugging PnP stuff,weingart1998-02-251-3/+9
| | | | and "it's just plain cool".
* Add some more extent stuff, in preperation of PnP. Huh? Did Iweingart1997-07-121-1/+62
| | | | | | | | say PnP? Anyways, this stuff just adds the ability to register the extents on creation, etc, etc... Someone needs to add a DDB command "show extent", to make this really usefull... ;-)
* Import extent manager from NetBSDniklas1996-12-091-61/+908
|
* tiny extent manager by shawnderaadt1996-08-071-0/+100