qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Implementing atomic SWP in qemu-arm
@ 2010-08-18 19:15 Peter W Schultz
  2010-08-18 19:37 ` Nathan Froyd
  0 siblings, 1 reply; 2+ messages in thread
From: Peter W Schultz @ 2010-08-18 19:15 UTC (permalink / raw)
  To: qemu-devel

It is my job to make qemu-arm implement the SWPcc instruction
atomically. Currently, qemu implements this instruction as a load
followed by a store, in a way vulnerable to race conditions.

We are extending qemu to handle a high number of processors, and our
simple testcase using pthreads seems to cause a deadlock somewhere in
qemu. It is the beliefs of my professor and I that the implementation
of SWP is the reason.

How would I go about modifying the qemu source to implement SWP
atomically? I have been studying the source for a few days now, and I
am at a loss as to what all needs to be done.

I feel it would be most desirable to add a TCG_SWAP instruction that
is guaranteed to be an atomic compare-and-swap, and implement that as
needed.

Best,
Kaedenn

-- 
Undergraduate Student
University of California, Santa Cruz

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

end of thread, other threads:[~2010-08-18 19:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18 19:15 [Qemu-devel] Implementing atomic SWP in qemu-arm Peter W Schultz
2010-08-18 19:37 ` Nathan Froyd

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).