summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorPrakash Surya <[email protected]>2012-08-23 14:00:58 -0700
committerBrian Behlendorf <[email protected]>2012-08-24 09:43:22 -0700
commit08850eddcb128cbdca584255324d71dfee2ccba9 (patch)
tree000c6cd4d1c90648a02593cca4d786146f6ceb59 /include/sys
parent15d0411297113cb2681f5522ed373d4d37fcf132 (diff)
Avoid calling smp_processor_id in spl_magazine_age
The spl_magazine_age function had the implied assumption that it will remain on its current cpu through its execution. In order to support preempt enabled kernels, this assumption had to be removed. The spl_kmem_magazine structure now holds the cpu id of the cpu it is local to. This allows spl_magazine_age to use this field when scheduling work to be done by the magazine's local cpu. Signed-off-by: Brian Behlendorf <[email protected]> Issue #98
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/kmem.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/kmem.h b/include/sys/kmem.h
index 4383efb7c..344e2716b 100644
--- a/include/sys/kmem.h
+++ b/include/sys/kmem.h
@@ -353,6 +353,7 @@ typedef struct spl_kmem_magazine {
struct spl_kmem_cache *skm_cache; /* Owned by cache */
struct delayed_work skm_work; /* Magazine reclaim work */
unsigned long skm_age; /* Last cache access */
+ unsigned int skm_cpu; /* Owned by cpu */
void *skm_objs[0]; /* Object pointers */
} spl_kmem_magazine_t;