From: Peter Zijlstra <peterz@infradead.org>
To: Christoph Lameter <cl@linux.com>
Cc: Tejun Heo <tj@kernel.org>,
akpm@linuxfoundation.org, linux-arch@vger.kernel.org,
Steven Rostedt <srostedt@redhat.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>
Subject: Re: [gcv v4 05/38] percpu: Add preemption checks to __this_cpu ops
Date: Mon, 16 Sep 2013 12:30:52 +0200 [thread overview]
Message-ID: <20130916103052.GB29018@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <00000140e5f56965-daead878-020f-4dd9-b239-5547db26f274-000000@email.amazonses.com>
On Tue, Sep 03, 2013 at 10:33:20PM +0000, Christoph Lameter wrote:
> We define a check function in order to avoid trouble with the
> include files. Then the higher level __this_cpu macros are
> modified to involve the check before any operation.
>
So this_cpu_ptr() is the one with the check, and __this_cpu_ptr() is the
one without. But for the other this_cpu ops __this_cpu_$OP() is going to
be the one with a check and this_cpu_$OP() the one without?
Sounds like a bloody marvelous idea :/
> Index: linux/include/linux/percpu.h
> ===================================================================
> --- linux.orig/include/linux/percpu.h 2013-09-03 13:38:49.818888738 -0500
> +++ linux/include/linux/percpu.h 2013-09-03 13:38:49.810888819 -0500
> @@ -172,6 +172,12 @@ extern phys_addr_t per_cpu_ptr_to_phys(v
>
> extern void __bad_size_call_parameter(void);
>
> +#ifdef CONFIG_PREEMPT
> +extern void this_cpu_preempt_check(void);
> +#else
> +static inline void this_cpu_preempt_check(void) { }
> +#endif
How about re-using debug_smp_processor_id() instead?
next prev parent reply other threads:[~2013-09-16 10:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130903190014.794420260@linux.com>
2013-09-03 19:00 ` [gcv v4 01/38] x86: Use this_cpu_inc/dec for debug registers Christoph Lameter
2013-09-03 19:00 ` [gcv v4 02/38] percpu: Make __verify_pcu_ptr handle per cpu pointers to arrays Christoph Lameter
2013-09-03 19:12 ` [gcv v4 04/38] Use raw_cpu ops so that my kvm session runs fine Christoph Lameter
2013-09-03 19:12 ` [gcv v4 07/38] net: Replace __get_cpu_var uses Christoph Lameter
2013-09-03 19:12 ` [gcv v4 15/38] watchdog: " Christoph Lameter
2013-09-03 19:32 ` [gcv v4 09/38] scheduler: " Christoph Lameter
2013-09-03 19:32 ` [gcv v4 12/38] block: " Christoph Lameter
2013-09-03 20:12 ` [gcv v4 03/38] Subject; percpu: Add raw_cpu_ops Christoph Lameter
2013-09-03 20:12 ` [gcv v4 06/38] Coccinelle script for __get_cpu_var conversion Christoph Lameter
2013-09-03 20:12 ` [gcv v4 13/38] rcu: Replace __get_cpu_var uses Christoph Lameter
2013-09-03 21:22 ` [gcv v4 17/38] drivers/char: " Christoph Lameter
2013-09-03 21:22 ` [gcv v4 16/38] kernel misc: " Christoph Lameter
2013-09-03 21:22 ` [gcv v4 10/38] mm: " Christoph Lameter
2013-09-03 22:32 ` [gcv v4 08/38] time: " Christoph Lameter
2013-09-03 22:32 ` [gcv v4 11/38] tracing: " Christoph Lameter
2013-09-03 22:32 ` [gcv v4 14/38] percpu: " Christoph Lameter
2013-09-03 22:33 ` [gcv v4 05/38] percpu: Add preemption checks to __this_cpu ops Christoph Lameter
2013-09-16 10:30 ` Peter Zijlstra [this message]
2013-09-16 13:23 ` Christoph Lameter
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=20130916103052.GB29018@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linuxfoundation.org \
--cc=cl@linux.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=srostedt@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
all inboxes | Powered by JetHome®