lkml.org 
[lkml]   [2009]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3] slqb: Do not use DEFINE_PER_CPU for per-node data
From
Date
Hi Tejun,

On Mon, 2009-09-21 at 00:55 +0900, Tejun Heo wrote:
> Pekka Enberg wrote:
> > Tejun Heo wrote:
> >> Pekka Enberg wrote:
> >>> On Fri, Sep 18, 2009 at 10:34 PM, Mel Gorman <mel@csn.ul.ie> wrote:
> >>>> SLQB used a seemingly nice hack to allocate per-node data for the
> >>>> statically
> >>>> initialised caches. Unfortunately, due to some unknown per-cpu
> >>>> optimisation, these regions are being reused by something else as the
> >>>> per-node data is getting randomly scrambled. This patch fixes the
> >>>> problem but it's not fully understood *why* it fixes the problem at the
> >>>> moment.
> >>> Ouch, that sounds bad. I guess it's architecture specific bug as x86
> >>> works ok? Lets CC Tejun.
> >>
> >> Is the corruption being seen on ppc or s390?
> >
> > On ppc.
>
> Can you please post full dmesg showing the corruption? Also, if you
> apply the attached patch, does the added BUG_ON() trigger?

I don't have the affected machines, Sachin and Mel do.

Pekka

> diff --git a/include/linux/percpu.h b/include/linux/percpu.h
> index 878836c..fb690d2 100644
> --- a/include/linux/percpu.h
> +++ b/include/linux/percpu.h
> @@ -127,7 +127,7 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size,
> * dynamically allocated. Non-atomic access to the current CPU's
> * version should probably be combined with get_cpu()/put_cpu().
> */
> -#define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu)))
> +#define per_cpu_ptr(ptr, cpu) ({ BUG_ON(!(ptr)); SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))); })
>
> extern void *__alloc_reserved_percpu(size_t size, size_t align);



\
 
 \ /
  Last update: 2009-09-21 08:27    [W:0.183 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site