diff options
author | silby <silby@FreeBSD.org> | 2005-07-16 02:23:41 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2005-07-16 02:23:41 +0000 |
commit | 24f7a1c3d6fc7181b6310f850c3ef744a1d99039 (patch) | |
tree | f3b34d0dc837dc462214767a18c64b86a0155c62 /sys | |
parent | 425ca78cc44362153e43d4d6ae508e5fa7232ef1 (diff) | |
download | FreeBSD-src-24f7a1c3d6fc7181b6310f850c3ef744a1d99039.zip FreeBSD-src-24f7a1c3d6fc7181b6310f850c3ef744a1d99039.tar.gz |
Increase the flags field for kegs from a 16 to a 32 bit value;
we have exhausted all 16 flags.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/uma.h | 4 | ||||
-rw-r--r-- | sys/vm/uma_core.c | 10 | ||||
-rw-r--r-- | sys/vm/uma_int.h | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sys/vm/uma.h b/sys/vm/uma.h index aed3580..5d37ad8 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -165,7 +165,7 @@ typedef void (*uma_fini)(void *mem, int size); */ uma_zone_t uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, uma_init uminit, uma_fini fini, int align, - u_int16_t flags); + u_int32_t flags); /* * Create a secondary uma zone @@ -206,7 +206,7 @@ uma_zone_t uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor, * Definitions for uma_zcreate flags * * These flags share space with UMA_ZFLAGs in uma_int.h. Be careful not to - * overlap when adding new features. 0xf000 is in use by uma_int.h. + * overlap when adding new features. 0xf0000000 is in use by uma_int.h. */ #define UMA_ZONE_PAGEABLE 0x0001 /* Return items not fully backed by physical memory XXX Not yet */ diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 2760187..c38c030 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -155,7 +155,7 @@ struct uma_zctor_args { uma_fini fini; uma_keg_t keg; int align; - u_int16_t flags; + u_int32_t flags; }; struct uma_kctor_args { @@ -164,7 +164,7 @@ struct uma_kctor_args { uma_init uminit; uma_fini fini; int align; - u_int16_t flags; + u_int32_t flags; }; struct uma_bucket_zone { @@ -236,7 +236,7 @@ static uma_slab_t uma_zone_slab(uma_zone_t zone, int flags); static void *uma_slab_alloc(uma_zone_t zone, uma_slab_t slab); static void zone_drain(uma_zone_t); static uma_zone_t uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, - uma_fini fini, int align, u_int16_t flags); + uma_fini fini, int align, u_int32_t flags); void uma_print_zone(uma_zone_t); void uma_print_stats(void); @@ -1713,7 +1713,7 @@ uma_startup3(void) static uma_zone_t uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, - int align, u_int16_t flags) + int align, u_int32_t flags) { struct uma_kctor_args args; @@ -1729,7 +1729,7 @@ uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, /* See uma.h */ uma_zone_t uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, - uma_init uminit, uma_fini fini, int align, u_int16_t flags) + uma_init uminit, uma_fini fini, int align, u_int32_t flags) { struct uma_zctor_args args; diff --git a/sys/vm/uma_int.h b/sys/vm/uma_int.h index 8865d30..b861de8 100644 --- a/sys/vm/uma_int.h +++ b/sys/vm/uma_int.h @@ -219,7 +219,7 @@ struct uma_keg { u_int16_t uk_pgoff; /* Offset to uma_slab struct */ u_int16_t uk_ppera; /* pages per allocation from backend */ u_int16_t uk_ipers; /* Items per slab */ - u_int16_t uk_flags; /* Internal flags */ + u_int32_t uk_flags; /* Internal flags */ }; /* Simpler reference to uma_keg for internal use. */ @@ -319,10 +319,10 @@ struct uma_zone { /* * These flags must not overlap with the UMA_ZONE flags specified in uma.h. */ -#define UMA_ZFLAG_PRIVALLOC 0x1000 /* Use uz_allocf. */ -#define UMA_ZFLAG_INTERNAL 0x2000 /* No offpage no PCPU. */ -#define UMA_ZFLAG_FULL 0x4000 /* Reached uz_maxpages */ -#define UMA_ZFLAG_CACHEONLY 0x8000 /* Don't ask VM for buckets. */ +#define UMA_ZFLAG_PRIVALLOC 0x10000000 /* Use uz_allocf. */ +#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. */ /* Internal prototypes */ static __inline uma_slab_t hash_sfind(struct uma_hash *hash, u_int8_t *data); |