From 08850eddcb128cbdca584255324d71dfee2ccba9 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Thu, 23 Aug 2012 14:00:58 -0700 Subject: 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 Issue #98 --- include/sys/kmem.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sys') 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; -- cgit v1.2.3