patch-2.4.0-test6 linux/kernel/timer.c

Next file: linux/kernel/user.c
Previous file: linux/kernel/sysctl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test5/linux/kernel/timer.c linux/kernel/timer.c
@@ -22,6 +22,7 @@
 #include <linux/smp_lock.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
+#include <linux/slab.h>
 
 #include <asm/uaccess.h>
 
@@ -162,9 +163,9 @@
 
 /* Initialize both explicitly - let's try to have them in the same cache line */
 spinlock_t timerlist_lock = SPIN_LOCK_UNLOCKED;
-volatile struct timer_list * volatile running_timer = NULL;
 
 #ifdef CONFIG_SMP
+volatile struct timer_list * volatile running_timer = NULL;
 #define timer_enter(t) do { running_timer = t; mb(); } while (0)
 #define timer_exit() do { running_timer = NULL; } while (0)
 #define timer_is_running(t) (running_timer == t)
@@ -172,8 +173,6 @@
 #else
 #define timer_enter(t)		do { } while (0)
 #define timer_exit()		do { } while (0)
-#define timer_is_running(t)	(0)
-#define timer_synchronize(t)	do { (void)(t); barrier(); } while(0)
 #endif
 
 void add_timer(struct timer_list *timer)
@@ -599,6 +598,9 @@
 		kstat.per_cpu_system[cpu] += system;
 	} else if (local_bh_count(cpu) || local_irq_count(cpu) > 1)
 		kstat.per_cpu_system[cpu] += system;
+
+	if (slab_cache_drain_mask & (1UL << cpu))
+		slab_drain_local_cache();
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)