From: Christoph Lameter <cl@linux-foundation.org>
To: Tejun Heo <tj@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Rusty Russell <rusty@rustcorp.com.au>,
Ingo Molnar <mingo@elte.hu>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] this_cpu: Use this_cpu_xx in trace_functions_graph.c
Date: Tue, 13 Oct 2009 11:14:28 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.1.10.0910131110110.8088@gentwo.org> (raw)
In-Reply-To: <4AD49559.5050707@kernel.org>
On Tue, 13 Oct 2009, Tejun Heo wrote:
> > For this_cpu_ptr / __this_cpu_ptr it does not matter. this_cpu_ptr gives
> > you additional checks.
>
> Yes, you're right. The naming scheme in percpu sucks really hard.
> The subtle differences among [__]get_cpu_var(), [__]this_cpu_ptr() and
> other this_cpu ops. Arghhhhhh.......
Yeah. __this_cpu_ptr is safe to use in preempt / irq disable sections
though the same way as __this_cpu_add/dec etc.
(__)get_cpu_var can be mostly gotten rid off through __this_cpu
operations.
We could define __get_cpu_var and get_cpu_var using this_cpu
#define get_cpu_var(x) (get_cpu(); this_cpu_read(per_cpu_var(x))
#define __get_cpu_var __this_cpu_read(per_cpu_var(x))
prev parent reply other threads:[~2009-10-13 15:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 3:48 linux-next: percpu tree build failure Stephen Rothwell
2009-10-13 14:29 ` [PATCH] this_cpu: Use this_cpu_xx in trace_functions_graph.c Tejun Heo
2009-10-13 14:36 ` Christoph Lameter
2009-10-13 14:47 ` Tejun Heo
2009-10-13 14:45 ` Christoph Lameter
2009-10-13 14:57 ` Tejun Heo
2009-10-13 15:14 ` Christoph Lameter [this message]
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=alpine.DEB.1.10.0910131110110.8088@gentwo.org \
--to=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=sfr@canb.auug.org.au \
--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
all inboxes | Powered by JetHome®