[lkml]   [2003]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: percpu-2.5.63-bkcurr
On Fri, Feb 28, 2003 at 09:59:22PM -0800, William Lee Irwin III wrote:
> Shove per-cpu areas into node-local memory for i386 discontigmem,
> or at least NUMA-Q. You'll have to plop down early_cpu_to_node()
> and early_node_to_cpumask() stubs to use it on, say Summit.

Tentative followup #1 (thanks Zwane!)

Use per-cpu rq's in the sched.c to avoid remote cache misses there.
It actually means something now.

Index: linux-2.5.59/kernel/sched.c
RCS file: /build/cvsroot/linux-2.5.59/kernel/sched.c,v
retrieving revision
diff -u -r1.1.1.1 sched.c
--- linux-2.5.59/kernel/sched.c 17 Jan 2003 02:46:29 -0000
+++ linux-2.5.59/kernel/sched.c 17 Jan 2003 10:03:31 -0000
@@ -160,9 +160,9 @@
atomic_t nr_iowait;
} ____cacheline_aligned;

-static struct runqueue runqueues[NR_CPUS] __cacheline_aligned;
+static DEFINE_PER_CPU(struct runqueue, runqueues) = {{ 0 }};

-#define cpu_rq(cpu) (runqueues + (cpu))
+#define cpu_rq(cpu) (&per_cpu(runqueues, cpu))
#define this_rq() cpu_rq(smp_processor_id())
#define task_rq(p) cpu_rq(task_cpu(p))
#define cpu_curr(cpu) (cpu_rq(cpu)->curr)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.034 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site