From: Peter Zijlstra <peterz@infradead.org>
To: Tejun Heo <tj@kernel.org>
Cc: Valdis.Kletnieks@vt.edu,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] percpu,lockdep: implement and use is_static_percpu_address()
Date: Tue, 09 Mar 2010 12:52:20 +0100 [thread overview]
Message-ID: <1268135540.4162.5.camel@twins> (raw)
In-Reply-To: <4B963441.40000@kernel.org>
On Tue, 2010-03-09 at 20:42 +0900, Tejun Heo wrote:
> Hello, Peter.
>
> On 03/09/2010 08:25 PM, Peter Zijlstra wrote:
> >> +/* can't distinguish from other static vars, always false */
> >> +static inline bool is_static_percpu_address(unsigned long addr)
> >> +{
> >> + return false;
> >> +}
> >
> > At this point it might make sense to simply fail to compile if lockdep
> > is enabled as well.
> >
> > I'm not sure if there's many SMP archs that don't have this and do have
> > lockdep, but simply failing this test isn't really an option.
>
> That might be better. Returning %false isn't that bad tho. There
> really is no distinction between percpu and !percpu variable on UP and
> static variable address match will catch both.
Ah, if this is UP only then yes, no complaints ;-)
> >> /**
> >> + * is_static_percpu_address - test whether address is from static percpu area
> >> + * @addr: address to test
> >> + *
> >> + * Test whether @addr belongs to static percpu area. Module static
> >> + * percpu areas allocated via __alloc_reserved_percpu() is not
> >> + * considered. Use is_module_address() for those.
> >> + *
> >> + * RETURNS:
> >> + * %true if @addr is from static percpu area, %false otherwise.
> >> + */
> >
> > So is_module_address() will only return true for static per-cpu module
> > storage, right?
>
> Right, got confused there. I'll update is_static_percpu_address() to
> test for reserved regions too.
Or as per your other email, make the above be true, and have
is_module_address() be true for its static per-cpu regions.
next prev parent reply other threads:[~2010-03-09 11:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 18:30 odd lockdep messages Valdis.Kletnieks
2010-03-08 18:43 ` Peter Zijlstra
2010-03-08 20:00 ` Valdis.Kletnieks
2010-03-09 1:54 ` Tejun Heo
2010-03-09 6:27 ` Valdis.Kletnieks
2010-03-09 6:44 ` Tejun Heo
2010-03-09 8:51 ` Valdis.Kletnieks
2010-03-09 14:18 ` Greg KH
2010-03-09 9:12 ` [PATCH] percpu,lockdep: implement and use is_static_percpu_address() Tejun Heo
2010-03-09 11:25 ` Peter Zijlstra
2010-03-09 11:42 ` Tejun Heo
2010-03-09 11:46 ` Tejun Heo
2010-03-09 11:52 ` Peter Zijlstra [this message]
2010-03-10 9:56 ` [PATCH 1/2] module: encapsulate percpu handling better and record percpu_size Tejun Heo
2010-03-10 9:57 ` [PATCH 2/2] percpu,module: implement and use is_kernel/module_percpu_address() Tejun Heo
2010-03-10 10:42 ` Peter Zijlstra
2010-03-29 8:26 ` [PATCH 1/2] module: encapsulate percpu handling better and record percpu_size Rusty Russell
2010-03-29 14:12 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1268135540.4162.5.camel@twins \
--to=peterz@infradead.org \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).