linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [OT] ppc64 serialization problem
@ 2006-03-29  1:58 Greg Smith
  2006-03-29  3:11 ` Benjamin Herrenschmidt
  2006-03-29  4:07 ` Paul Mackerras
  0 siblings, 2 replies; 9+ messages in thread
From: Greg Smith @ 2006-03-29  1:58 UTC (permalink / raw)
  To: linuxppc-dev

We have a multi-threaded app running on a p520 in 64 bit mode.

Thread A does

pthread_mutex_lock(&lock);
u32 &= ~bitA;
pthread_mutex_unlock(&lock);

and Thread B does

pthread_mutex_lock(&lock);
u32 |= bitB;
A = u32;
B = u32;
pthread_mutex_unlock(&lock);

On rare occasions, values A and B will differ!  In the examples that I
have seen, there is contention with `lock'.  This phenomenon does not
occur on ppc32 or a number of other architectures that we support.

I confess I do not know the linux version nor the glibc version nor what
pthreads implementation is being used.  I'll find that out shortly.

What I am curious about is where the problem might lie
(kernel/lib/pthreads/app) so I can ask the right people.

Thank you for your patience,
Greg Smith

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-03-29 21:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-29  1:58 [OT] ppc64 serialization problem Greg Smith
2006-03-29  3:11 ` Benjamin Herrenschmidt
2006-03-29  4:08   ` Greg Smith
2006-03-29  4:21     ` Benjamin Herrenschmidt
2006-03-29  4:07 ` Paul Mackerras
2006-03-29 18:20   ` Greg Smith
2006-03-29 18:32     ` Olaf Hering
2006-03-29 18:42       ` Ivan Warren
2006-03-29 21:29         ` Ivan Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).