[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwgnhhoV=9PT3N0YToEwKDUB6pqOQhX3+6o3CeccC10=g@mail.gmail.com>
Date: Fri, 23 Mar 2012 19:00:28 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: paulmck@...ux.vnet.ibm.com
Cc: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] RCU changes for v3.4
On Fri, Mar 23, 2012 at 6:47 PM, Paul E. McKenney
<paulmck@...ux.vnet.ibm.com> wrote:
>
> This is what I get on a 32-bit build, according to objdump:
>
> 24e3: 64 ff 05 00 00 00 00 incl %fs:0x0
You do? I'm surprised:
> +static inline void __rcu_read_lock(void)
> +{
> + __raw_get_cpu_var(rcu_read_lock_nesting)++;
> + barrier(); /* Keep code within RCU read-side critical section. */
> +}
This looks wrong.
It should use "this_cpu_inc(rcu_read_lock_nesting)", I don't even see
how you get gcc to generate that "inc %fs:" without it.
In general, I don't think you should ever use the __raw_get_cpu_var() things.
Linus
--
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