Re: [GIT RFC] percpu: use dynamic percpu allocator as the defaultpercpu allocator

From: Tejun Heo
Date: Wed Mar 25 2009 - 08:31:27 EST


Ingo Molnar wrote:
> * Tejun Heo <tj@xxxxxxxxxx> wrote:
>
>>> With your patches and a RELOC_HIDE version that uses the GOTENT
>>> indirection the kernel won't compile because the "X" constraint
>>> for the GOTENT access needs a symbol and there are quite a few
>>> users that pass a pointer. I do not see a simple solution for
>>> that problem yet.
>> Ah... okay. Now I get it. It wasn't expecting variables there. How
>> about doing the following?
>>
>> #define SHIFT_PERCPU_PTR(ptr, offset) (({ \
>> if (__builtin_constant_p(ptr)) \
>> do GOTENT trick; \
>> else \
>> RELOC_HIDE(); \
>> }))
>>
>> Thanks.
>
> Btw., is there any intermediate fix/workaround i could apply
> perhaps? I'd like to send the percpu bits early in the merge window
> and would hate to break Martin's arch ...

Martin's original patch should do the trick although it would be
slower for static symbols. I'll merge it and post the tree.

BTW, I couldn't do the sparc32 test as the sparc I got is IIe which
can't boot 32 bit kernels. :-(

Thanks.

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