Re: prev->has_cpu (fwd)

Andrea Arcangeli (andrea@e-mind.com)
Sat, 14 Nov 1998 18:37:31 +0100 (CET)


Linus, you could eventually apply this patch:

Index: linux/kernel/sched.c
diff -u linux/kernel/sched.c:1.1.1.1.16.21 linux/kernel/sched.c:1.1.1.1.16.22
--- linux/kernel/sched.c:1.1.1.1.16.21 Sat Nov 14 18:35:42 1998
+++ linux/kernel/sched.c Sat Nov 14 18:36:35 1998
@@ -611,10 +611,12 @@

#ifdef __SMP__
next->has_cpu = 1;
- next->processor = this_cpu;
#endif

if (prev != next) {
+#ifdef __SMP__
+ next->processor = this_cpu;
+#endif
kstat.context_swtch++;
get_mmu_context(next);
switch_to(prev,next);

It' s only a really little performance optimization...

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/