[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49DFF7EA.900@kernel.org>
Date: Fri, 10 Apr 2009 18:52:42 -0700
From: Tejun Heo <tj@...nel.org>
To: Rusty Russell <rusty@...tcorp.com.au>
CC: Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Ingo Molnar <mingo@...e.hu>, 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,
heiko.carstens@...ibm.com
Subject: Re: [GIT RFC] percpu: use dynamic percpu allocator as the default
percpu allocator
Rusty Russell wrote:
> On Thu, 9 Apr 2009 09:23:25 pm Tejun Heo wrote:
>> It's generally a good idea to use uniquely
>> distinguisible identifier for static symbols anyway to help debugging.
>
> Sorry, I can't let this statement stand. It's completely wrong: use the
> shortest clear name, always.
Heh... well, yeah, I don't think this is something everyone can agree
about. I generally like having proper prefix for static symbols. It
makes symbols more consistent too.
>> If this limitation is acceptable, I think we should also add the dup
>> build failure thing to the generic definition too tho so that such
>> cases can be discovered before they hit alpha and s390 later.
>>
>> Any objections?
>
> Yes. If we decide that static per-cpu is unsupportable, let's not
> hide the damn thing. We just make it give a compile warning if we
> can, patch out the current cases, and make checkpatch.pl warn on new
> ones.
>
> Don't silently override "static". Don't come up with stupid
> justifications. Accept with open-eyes that it's evil, just a lesser
> evil.
It's different tho. With the right tricks, we can still make percpu
variables defined static unusable from other compile units. ie. if we
make the combination of DECLARE_PER_CPU() and static DEFINE_PER_CPU()
trigger compile error, most of what the programmer meant by 'static'
can be achieved whether the symbol itself ends up visible outside of
the compile unit or not.
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