diff options
-rw-r--r-- | mm/slab.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -4029,18 +4029,17 @@ void drain_array(struct kmem_cache *cachep, struct kmem_list3 *l3, | |||
4029 | * If we cannot acquire the cache chain mutex then just give up - we'll try | 4029 | * If we cannot acquire the cache chain mutex then just give up - we'll try |
4030 | * again on the next iteration. | 4030 | * again on the next iteration. |
4031 | */ | 4031 | */ |
4032 | static void cache_reap(struct work_struct *unused) | 4032 | static void cache_reap(struct work_struct *w) |
4033 | { | 4033 | { |
4034 | struct kmem_cache *searchp; | 4034 | struct kmem_cache *searchp; |
4035 | struct kmem_list3 *l3; | 4035 | struct kmem_list3 *l3; |
4036 | int node = numa_node_id(); | 4036 | int node = numa_node_id(); |
4037 | struct delayed_work *work = | ||
4038 | container_of(w, struct delayed_work, work); | ||
4037 | 4039 | ||
4038 | if (!mutex_trylock(&cache_chain_mutex)) { | 4040 | if (!mutex_trylock(&cache_chain_mutex)) |
4039 | /* Give up. Setup the next iteration. */ | 4041 | /* Give up. Setup the next iteration. */ |
4040 | schedule_delayed_work(&__get_cpu_var(reap_work), | 4042 | goto out; |
4041 | round_jiffies_relative(REAPTIMEOUT_CPUC)); | ||
4042 | return; | ||
4043 | } | ||
4044 | 4043 | ||
4045 | list_for_each_entry(searchp, &cache_chain, next) { | 4044 | list_for_each_entry(searchp, &cache_chain, next) { |
4046 | check_irq_on(); | 4045 | check_irq_on(); |
@@ -4083,9 +4082,9 @@ next: | |||
4083 | mutex_unlock(&cache_chain_mutex); | 4082 | mutex_unlock(&cache_chain_mutex); |
4084 | next_reap_node(); | 4083 | next_reap_node(); |
4085 | refresh_cpu_vm_stats(smp_processor_id()); | 4084 | refresh_cpu_vm_stats(smp_processor_id()); |
4085 | out: | ||
4086 | /* Set up the next iteration */ | 4086 | /* Set up the next iteration */ |
4087 | schedule_delayed_work(&__get_cpu_var(reap_work), | 4087 | schedule_delayed_work(work, round_jiffies_relative(REAPTIMEOUT_CPUC)); |
4088 | round_jiffies_relative(REAPTIMEOUT_CPUC)); | ||
4089 | } | 4088 | } |
4090 | 4089 | ||
4091 | #ifdef CONFIG_PROC_FS | 4090 | #ifdef CONFIG_PROC_FS |