aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-10-12 12:31:05 -0700
committerBrian Behlendorf <[email protected]>2015-10-13 09:50:40 -0700
commit9b13f65d284d3a6b455df3199ffc83fd18bbdded (patch)
tree553d7c24cd00bed90101058851c6e77a48107a6f /include
parent374303a3c9f7783e2b8122f5dcf2c1d053cf13f7 (diff)
Fix CPU hotplug
Allocate a kmem cache magazine for every possible CPU which might be added to the system. This ensures that when one of these CPUs is enabled it can be safely used immediately. For many systems the number of online CPUs is identical to the number of present CPUs so this does imply an increased memory footprint. In fact, dynamically allocating the array of magazine pointers instead of using the worst case NR_CPUS can end up decreasing our memory footprint. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Ned Bass <[email protected]> Closes #482
Diffstat (limited to 'include')
-rw-r--r--include/sys/kmem_cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/kmem_cache.h b/include/sys/kmem_cache.h
index 75a0a55b7..e971c2b0d 100644
--- a/include/sys/kmem_cache.h
+++ b/include/sys/kmem_cache.h
@@ -170,7 +170,7 @@ typedef struct spl_kmem_cache {
uint32_t skc_magic; /* Sanity magic */
uint32_t skc_name_size; /* Name length */
char *skc_name; /* Name string */
- spl_kmem_magazine_t *skc_mag[NR_CPUS]; /* Per-CPU warm cache */
+ spl_kmem_magazine_t **skc_mag; /* Per-CPU warm cache */
uint32_t skc_mag_size; /* Magazine size */
uint32_t skc_mag_refill; /* Magazine refill count */
spl_kmem_ctor_t skc_ctor; /* Constructor */