diff options
author | jeff <jeff@FreeBSD.org> | 2013-06-26 00:57:38 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2013-06-26 00:57:38 +0000 |
commit | 4201cd7bd1c5bed3d57c96c4df0cdd038d6125bf (patch) | |
tree | 3abaa104be279f9d540f816530d3454d375f3709 /sys/vm/uma_int.h | |
parent | 4dfc3c75a2687795bcf32661c8434cf7628e82a2 (diff) | |
download | FreeBSD-src-4201cd7bd1c5bed3d57c96c4df0cdd038d6125bf.zip FreeBSD-src-4201cd7bd1c5bed3d57c96c4df0cdd038d6125bf.tar.gz |
- Resolve bucket recursion issues by passing a cookie with zone flags
through bucket_alloc() to uma_zalloc_arg() and uma_zfree_arg().
- Make some smaller buckets for large zones to further reduce memory
waste.
- Implement uma_zone_reserve(). This holds aside a number of items only
for callers who specify M_USE_RESERVE. buckets will never be filled
from reserve allocations.
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/vm/uma_int.h')
-rw-r--r-- | sys/vm/uma_int.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/uma_int.h b/sys/vm/uma_int.h index b6bec1a..8d46c91 100644 --- a/sys/vm/uma_int.h +++ b/sys/vm/uma_int.h @@ -200,6 +200,7 @@ struct uma_keg { uint32_t uk_align; /* Alignment mask */ uint32_t uk_pages; /* Total page count */ uint32_t uk_free; /* Count of items free in slabs */ + uint32_t uk_reserve; /* Number of reserved items. */ uint32_t uk_size; /* Requested size of each item */ uint32_t uk_rsize; /* Real size of each item */ uint32_t uk_maxpages; /* Maximum number of pages to alloc */ @@ -325,12 +326,13 @@ struct uma_zone { */ #define UMA_ZFLAG_MULTI 0x04000000 /* Multiple kegs in the zone. */ #define UMA_ZFLAG_DRAINING 0x08000000 /* Running zone_drain. */ -#define UMA_ZFLAG_PRIVALLOC 0x10000000 /* Use uz_allocf. */ +#define UMA_ZFLAG_BUCKET 0x10000000 /* Bucket zone. */ #define UMA_ZFLAG_INTERNAL 0x20000000 /* No offpage no PCPU. */ #define UMA_ZFLAG_FULL 0x40000000 /* Reached uz_maxpages */ #define UMA_ZFLAG_CACHEONLY 0x80000000 /* Don't ask VM for buckets. */ -#define UMA_ZFLAG_INHERIT (UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY) +#define UMA_ZFLAG_INHERIT \ + (UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY | UMA_ZFLAG_BUCKET) static inline uma_keg_t zone_first_keg(uma_zone_t zone) |