[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49D3231D.2040403@kernel.org>
Date: Wed, 01 Apr 2009 17:17:33 +0900
From: Tejun Heo <tj@...nel.org>
To: Martin Schwidefsky <schwidefsky@...ibm.com>
CC: Ingo Molnar <mingo@...e.hu>, rusty@...tcorp.com.au,
tglx@...utronix.de, x86@...nel.org, linux-kernel@...r.kernel.org,
hpa@...or.com, Paul Mundt <lethal@...ux-sh.org>,
rmk@....linux.org.uk, starvik@...s.com, ralf@...ux-mips.org,
davem@...emloft.net, cooloney@...nel.org, kyle@...artin.ca,
matthew@....cx, grundler@...isc-linux.org, takata@...ux-m32r.org,
benh@...nel.crashing.org, rth@...ddle.net,
ink@...assic.park.msu.ru, heiko.carstens@...ibm.com
Subject: Re: [GIT RFC] percpu: use dynamic percpu allocator as the default
percpu allocator
Martin Schwidefsky wrote:
> On Wed, 01 Apr 2009 09:07:41 +0900
> Tejun Heo <tj@...nel.org> wrote:
>
>> Martin Schwidefsky wrote:
>>> I got the dynamic cpu allocator to work with the patch below. Anybody
>>> with an objection against the SHIFT_PERCPU_VAR macro ?
>> One of the main goals of the percpu allocator is removing the
>> distinction between statically and dynamically allocated percpu
>> variables, so that it can be treated like other normal variables. For
>> all archs other than s390, alpha and ia64, achieving this is easy, so
>> I wish we could come up with solution for the three archs too. Is it
>> possible to do similar stuff with pointer values with input
>> constraint which can take both constant and variable?
>
> Is the goal to use the same access macros for both dynamically and
> statically allocated percpu variables? That would make the proposed
> solution impractical.
Yeah, it's one of the goals so that we don't have to have two sets of
APIs (e.g. the fast percpu_*() accessors).
> The "X" constraint trick we used so far tells the compiler to pass the
> argument verbatim to the assembler. The assembler knows how to deal
> with symbol@...ENT. If we pass a gcc variable or even a more general
> term via an "X" constraint the assembler gets <something C-ish>@GOTENT.
> It is not possible to parse this in the assembler. To do what you want
> to achieve would mean to avoid using the "X" constraint. Which means
> that we cannot use the GOTENT trick anymore. If we let the compiler
> resolve the address for a static per cpu variable we end up with the
> larl problem. Ouch!
>
> So far the SHIFT_PERCPU_PTR/SHIFT_PERCPU_VAR is the only solution
> I have found for s390 and the dynamic percpu allocator. I'll keep
> looking for a better solution but I am not optimistic.
What does the assembler do when it gets GOTENT? GOTENT sounds like
global offset table entry, so does it make the assembler emit an entry
in GOT and then get the address indirectly?
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists