Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce per cpu access overhead

David Miller
2007-11-01T07:01:30Z

From: Christoph Lameter <clameter@sgi.com>
Date: Wed, 31 Oct 2007 21:16:59 -0700 (PDT)

> Index: linux-2.6/mm/allocpercpu.c
> ===================================================================
> --- linux-2.6.orig/mm/allocpercpu.c 2007-10-31 20:53:16.565486654 -0700
> +++ linux-2.6/mm/allocpercpu.c 2007-10-31 21:00:27.553486484 -0700
...
> @@ -37,7 +42,7 @@ enum unit_type { FREE, END, USED };
>
> static u8 cpu_alloc_map[UNITS_PER_CPU] = { 1, };
> static DEFINE_SPINLOCK(cpu_alloc_map_lock);
> -static DEFINE_PER_CPU(int, cpu_area)[UNITS_PER_CPU];
> +static DEFINE_PER_CPU(unsigned long long, cpu_area)[UNITS_PER_CPU];
>
> #define CPU_DATA_OFFSET ((unsigned long)&per_cpu__cpu_area)
>

This hunk helped the sparc64 looping OOPS I was getting, but cpus hang
in some other fashion soon afterwards.

I'll try to debug this some more later, I've dumped enough time into
this already :-)