summaryrefslogtreecommitdiffstats
path: root/include/sys/kmem.h
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-02-17 15:52:18 -0800
committerBrian Behlendorf <[email protected]>2009-02-17 15:52:18 -0800
commit9b1b8e4c2459a02fc230cdda65b13908f263fd36 (patch)
treea07c353f6d12800d37ad8da669e0975649cc8c5a /include/sys/kmem.h
parent1a944a7d0b1d9e62c7ac34d9041300007a656a17 (diff)
kmem slab magazine ageing deadlock
- The previous magazine ageing sceme relied on the on_each_cpu() function to call spl_magazine_age() on each cpu. It turns out this could deadlock with do_flush_tlb_all() which also relies on the IPI based on_each_cpu(). To avoid this problem a per- magazine delayed work item is created and indepentantly scheduled to the correct cpu removing the need for on_each_cpu(). - Additionally two unused fields were removed from the type spl_kmem_cache_t, they were hold overs from previous cleanup. - struct work_struct work - struct timer_list timer
Diffstat (limited to 'include/sys/kmem.h')
-rw-r--r--include/sys/kmem.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sys/kmem.h b/include/sys/kmem.h
index dc66a9153..cad652c91 100644
--- a/include/sys/kmem.h
+++ b/include/sys/kmem.h
@@ -250,10 +250,12 @@ typedef void (*spl_kmem_dtor_t)(void *, void *);
typedef void (*spl_kmem_reclaim_t)(void *);
typedef struct spl_kmem_magazine {
- uint32_t skm_magic; /* Sanity magic */
+ uint32_t skm_magic; /* Sanity magic */
uint32_t skm_avail; /* Available objects */
uint32_t skm_size; /* Magazine size */
uint32_t skm_refill; /* Batch refill size */
+ struct spl_kmem_cache *skm_cache; /* Owned by cache */
+ struct delayed_work skm_work; /* Magazine reclaim work */
unsigned long skm_age; /* Last cache access */
void *skm_objs[0]; /* Object pointers */
} spl_kmem_magazine_t;
@@ -296,8 +298,6 @@ typedef struct spl_kmem_cache {
uint32_t skc_reap; /* Slab reclaim count */
atomic_t skc_ref; /* Ref count callers */
struct delayed_work skc_work; /* Slab reclaim work */
- struct work_struct work;
- struct timer_list timer;
struct list_head skc_list; /* List of caches linkage */
struct list_head skc_complete_list;/* Completely alloc'ed */
struct list_head skc_partial_list; /* Partially alloc'ed */