Re: Serious problem with ticket spinlocks on ia64

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Petr Tesarik
Date: Monday, August 30, 2010 - 2:41 pm

On Monday 30 of August 2010 20:17:25 Luck, Tony wrote:

Hi Tony,

I've been also playing with my test case, and I haven't been able to reproduce 
it in user-space either. One thing I noticed was the apparently incorrect use 
of ALAT. The generated code for _spin_lock_irq contains:

invala;;
ld4.c.nc r11=[r32]
// Other instructions not affecting r20
ld4.c.nc r20=[r32]

IIUC, the subsequent compare can use an undefined value (r20 is not modified 
anywhere in this function, except by the ld4.c.nc, but that happens only on 
an ALAT miss, right?).

I changed the corresponding code in __ticket_spin_lock to:

   asm volatile ("ld4.c.nc %0=[%1]" : "+r"(serve) : "r"(p) : "memory");

(NB the "+r" constraint instead of "=r")

The generated code now re-uses r15. Unfortunately, Hedi's test case still 
fails for me. :(

Petr Tesarik
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Aug 27, 6:37 am)
Re: Serious problem with ticket spinlocks on ia64, Hedi Berriche, (Fri Aug 27, 6:48 am)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Aug 27, 7:09 am)
Re: Serious problem with ticket spinlocks on ia64, Hedi Berriche, (Fri Aug 27, 7:31 am)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Aug 27, 7:40 am)
Re: Serious problem with ticket spinlocks on ia64, Hedi Berriche, (Fri Aug 27, 7:52 am)
RE: Serious problem with ticket spinlocks on ia64, Luck, Tony, (Fri Aug 27, 9:08 am)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Aug 27, 9:37 am)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Aug 27, 10:16 am)
Re: Serious problem with ticket spinlocks on ia64, Hedi Berriche, (Fri Aug 27, 11:20 am)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Aug 27, 12:40 pm)
RE: Serious problem with ticket spinlocks on ia64, Luck, Tony, (Fri Aug 27, 1:29 pm)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Aug 27, 1:41 pm)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Aug 27, 2:03 pm)
RE: Serious problem with ticket spinlocks on ia64, Luck, Tony, (Fri Aug 27, 2:11 pm)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Aug 27, 3:13 pm)
RE: Serious problem with ticket spinlocks on ia64, Luck, Tony, (Fri Aug 27, 4:26 pm)
RE: Serious problem with ticket spinlocks on ia64, Luck, Tony, (Fri Aug 27, 4:55 pm)
Re: Serious problem with ticket spinlocks on ia64, Hedi Berriche, (Fri Aug 27, 5:28 pm)
RE: Serious problem with ticket spinlocks on ia64, Luck, Tony, (Fri Aug 27, 10:01 pm)
RE: Serious problem with ticket spinlocks on ia64, Luck, Tony, (Mon Aug 30, 11:17 am)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Mon Aug 30, 2:41 pm)
Re: Serious problem with ticket spinlocks on ia64, Tony Luck, (Mon Aug 30, 3:43 pm)
Re: Serious problem with ticket spinlocks on ia64, Tony Luck, (Tue Aug 31, 3:17 pm)
Re: Serious problem with ticket spinlocks on ia64, Tony Luck, (Wed Sep 1, 4:09 pm)
Re: Serious problem with ticket spinlocks on ia64, Hedi Berriche, (Wed Sep 1, 5:26 pm)
Re: Serious problem with ticket spinlocks on ia64, Tony Luck, (Thu Sep 2, 5:06 pm)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Sep 3, 2:04 am)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Sep 3, 7:35 am)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Fri Sep 3, 7:52 am)
Re: Serious problem with ticket spinlocks on ia64, Tony Luck, (Fri Sep 3, 8:50 am)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Mon Sep 6, 7:47 am)
Re: Serious problem with ticket spinlocks on ia64, Petr Tesarik, (Tue Sep 7, 6:17 am)
Re: Serious problem with ticket spinlocks on ia64, Tony Luck, (Tue Sep 7, 10:35 am)
Re: Serious problem with ticket spinlocks on ia64, Tony Luck, (Wed Sep 8, 8:55 am)
Re: Serious problem with ticket spinlocks on ia64, Dave Jones, (Thu Sep 9, 7:55 pm)