Re: [PATCH] Avoid unpaired stwcx. on some processors

2007-11-10 Thread Olof Johansson
On Sun, Nov 11, 2007 at 03:46:05PM +1100, Benjamin Herrenschmidt wrote: > > > Seems like a "better" (but still ugly) workaround would be to create a > > _new_ reservation to a RA that's unavailable to any userspace process, > > so that they could never do a successful store to it. That way you wou

Re: [PATCH] Avoid unpaired stwcx. on some processors

2007-11-10 Thread Benjamin Herrenschmidt
> Seems like a "better" (but still ugly) workaround would be to create a > _new_ reservation to a RA that's unavailable to any userspace process, > so that they could never do a successful store to it. That way you would > have stray reservations, but never dangling stwcx:es. No? Many processors

Re: [PATCH] Avoid unpaired stwcx. on some processors

2007-11-09 Thread Olof Johansson
On Fri, Nov 09, 2007 at 05:52:30PM -0600, Becky Bruce wrote: > I don't think so. It's not plain old dangling stwcx that's the > problem. It's dangling stwcx when the reservation is held to another > address. Gack, I misread the description. My bad. > The lwarx that I've added prevents the

Re: [PATCH] Avoid unpaired stwcx. on some processors

2007-11-09 Thread Becky Bruce
On Nov 9, 2007, at 5:19 PM, Olof Johansson wrote: > On Fri, Nov 09, 2007 at 04:08:06PM -0600, Becky Bruce wrote: >> The context switch code in the kernel issues a dummy stwcx. to >> clear the >> reservation, as recommended by the architecture. However, some >> processors >> can have issues if

Re: [PATCH] Avoid unpaired stwcx. on some processors

2007-11-09 Thread Olof Johansson
On Fri, Nov 09, 2007 at 04:08:06PM -0600, Becky Bruce wrote: > The context switch code in the kernel issues a dummy stwcx. to clear the > reservation, as recommended by the architecture. However, some processors > can have issues if this stwcx to address A occurs while the reservation > is already

[PATCH] Avoid unpaired stwcx. on some processors

2007-11-09 Thread Becky Bruce
The context switch code in the kernel issues a dummy stwcx. to clear the reservation, as recommended by the architecture. However, some processors can have issues if this stwcx to address A occurs while the reservation is already held to a different address B. To avoid this problem, the dummy stwc

[PATCH] Avoid unpaired stwcx. on some processors

2007-11-09 Thread Becky Bruce
The context switch code in the kernel issues a dummy stwcx. to clear the reservation, as recommended by the architecture. However, some processors can have issues if this stwcx to address A occurs while the reservation is already held to a different address B. To avoid this problem, the dummy stwc