Re: current_thread_info() not respecting program order with gcc 4.8.x

2013-11-22 Thread Mathieu Desnoyers
gt; , "Will Deacon" , "Catalin > Marinas" , > "Peter Zijlstra" , lttng-...@lists.lttng.org, "Nathan > Lynch" , "Paul > E. McKenney" , "Andrew Morton" > , "Bhaskar Janakiraman" > , "Han Shen" &

Re: current_thread_info() not respecting program order with gcc 4.8.x

2013-11-22 Thread Luis Lozano
Zijlstra" , lttng-...@lists.lttng.org, >> > "Nathan Lynch" , "Paul >> > E. McKenney" , "Andrew Morton" >> > , "Bhaskar Janakiraman" >> > , "Han Shen" >> > Sent: Thursday, November 21, 2013 9:3

Re: current_thread_info() not respecting program order with gcc 4.8.x

2013-11-22 Thread Luis Lozano
weird_ issue. > > But after a long day of debugging, it's time for some sleep. I will get back > to this > tomorrow, > > Thanks, > > Mathieu > > > > > Thanks > > > > Luis > > > > > > > > > > On Thu, Nov 21, 2013 at 5:57

Re: current_thread_info() not respecting program order with gcc 4.8.x

2013-11-20 Thread Luis Lozano
I have been monitoring this thread and trying to understand how could this happen. I noticed that the definition for ARM of current_thread_info looks like this: /* * how to get the thread information struct from C */ static inline struct thread_info *current_thread_info(void) __attribute_const_

Re: current_thread_info() not respecting program order with gcc 4.8.x

2013-11-19 Thread Peter Zijlstra
On Tue, Nov 19, 2013 at 05:02:20PM +, Mathieu Desnoyers wrote: > Unfortunately I don't have a ARM cross-compiler setup ready. Nathan could test > it for us though. > > It might shuffle things around enough to work around the issue, but with the > approach you propose, I would be concerned abou

Re: current_thread_info() not respecting program order with gcc 4.8.x

2013-11-19 Thread Mathieu Desnoyers
uot; > , "Linus Torvalds" > , "Andrew Morton" > > Sent: Tuesday, November 19, 2013 11:05:02 AM > Subject: Re: current_thread_info() not respecting program order with gcc 4.8.x > > On Tue, Nov 19, 2013 at 03:29:12PM +, Mathieu Desnoyers wrot

Re: current_thread_info() not respecting program order with gcc 4.8.x

2013-11-19 Thread Peter Zijlstra
On Tue, Nov 19, 2013 at 05:13:22PM +0100, Jakub Jelinek wrote: > On Tue, Nov 19, 2013 at 04:57:49PM +0100, Peter Zijlstra wrote: > > On Tue, Nov 19, 2013 at 03:29:12PM +, Mathieu Desnoyers wrote: > > > However, looking at ARM arch/arm/include/asm/thread_info.h: > > > > > > static inline struct

Re: current_thread_info() not respecting program order with gcc 4.8.x

2013-11-19 Thread Jakub Jelinek
On Tue, Nov 19, 2013 at 04:57:49PM +0100, Peter Zijlstra wrote: > On Tue, Nov 19, 2013 at 03:29:12PM +, Mathieu Desnoyers wrote: > > However, looking at ARM arch/arm/include/asm/thread_info.h: > > > > static inline struct thread_info *current_thread_info(void) { register > > unsigned long sp a

Re: current_thread_info() not respecting program order with gcc 4.8.x

2013-11-19 Thread Peter Zijlstra
On Tue, Nov 19, 2013 at 03:29:12PM +, Mathieu Desnoyers wrote: > Hi, > > I got a bug report on ARM which appears to be caused by an aggressive > gcc optimisation starting from gcc 4.8.x due to lack of constraints on > the current_thread_info() inline assembly. The only logical > explanation fo