[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0000014054f7bbe5-97cac4df-1811-4f3f-8bfe-8f754774e006-000000@email.amazonses.com>
Date: Tue, 6 Aug 2013 18:50:56 +0000
From: Christoph Lameter <cl@...two.org>
To: Steven Rostedt <rostedt@...dmis.org>
cc: linux-kernel@...r.kernel.org
Subject: Re: x86: use this_cpu for debug_stack_usage
On Tue, 6 Aug 2013, Steven Rostedt wrote:
> I don't remember why I didn't use this in the first place. Perhaps I was
> still in the "get_cpu" mind set.
>
> Also, what's the difference between "__this_cpu_inc()" and
> "this_cpu_inc()"?
The fallback logic for arches not supporting segment prefixes is differnt.
this_cpu_inc() disables interrupts.
__this_cpu_inc() is used when you know that the scheduler cannot move the
process.
The code generated by both is the same on x86.
> > int is_debug_stack(unsigned long addr);
> > void debug_stack_set_zero(void);
>
> Might as well change is_debug_stack() to use __this_cpu_read() instead
> of __get_cpu_var().
True and that will also shave off some instructions.
--
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