[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130916103052.GB29018@twins.programming.kicks-ass.net>
Date: Mon, 16 Sep 2013 12:30:52 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Christoph Lameter <cl@...ux.com>
Cc: Tejun Heo <tj@...nel.org>, akpm@...uxfoundation.org,
linux-arch@...r.kernel.org, Steven Rostedt <srostedt@...hat.com>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>
Subject: Re: [gcv v4 05/38] percpu: Add preemption checks to __this_cpu ops
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?
--
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