large lockdep bss (was: Re: [patch 01/28] cpu alloc: The allocator)

Peter Zijlstra
2007-11-16T10:24:18Z

On Wed, 2007-11-14 at 03:28 +0100, Andi Kleen wrote:
> On Tue, Nov 13, 2007 at 05:52:08PM -0800, David Miller wrote:
> > Yes, I've run into similar problems with lockdep as well.
> > I had to build an ultra minimalized kernel to get it to
> > boot on my Niagara boxes.
> >
> > I think I even looked at the same lockdep code, and I'd
> > appreciate it if you'd submit your fix for this if you
> > haven't already.
>
> ftp://firstfloor.org/pub/ak/x86_64/quilt/patches/early-reserve
> ftp://firstfloor.org/pub/ak/x86_64/quilt/patches/early-alloc
> ftp://firstfloor.org/pub/ak/x86_64/quilt/patches/lockdep-early-alloc
>
> I didn't plan to submit it for .24, just .25. Or do you need it
> urgently?
>
> Also it would require you to write a sparc specific arch_early_alloc()
> of course. I've only done the x86-64 version.

Would've been nice to have heard about this lockdep problem. Anyway,
thanks for tackling it.

How about moving this bit:

+#ifndef ARCH_HAS_EARLY_ALLOC
+#define LARGEVAR(x,y) { static typeof(*x) __ ## x[y]; x = __ ## x; }
+#else
+#define LARGEVAR(x,y) x = arch_early_alloc(sizeof(*x) * y)
+#endif

out of the lockdep code and into the generic early alloc code?