qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-arm-static, multiprocess, atomic
@ 2016-05-25 12:34 Jeff Epler
  2016-05-26 10:42 ` Sergey Fedorov
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Epler @ 2016-05-25 12:34 UTC (permalink / raw)
  To: qemu-devel

Hi.  Before I take the time to prepare a detailed bug report, I wanted to
ask whether I'm doing something that is expected to work, or expected not
to work.

I am a developer of the LinuxCNC, Free and Open Source software for control
of milling machines, lathes, and so forth.

Our software uses an IPC model where multiple processes share a
memory-mapped region which contains data as well as mutexes to manipulate
the data (using gcc intrinsics like
__sync_fetch_and_or).

On real multiprocessor ARM systems, our testsuite passes, but when running
in a debian schroot using qemu-arm-static it regularly deadlocks,
apparently with two processes both trying to take the same mutex in a
shared memory region.

>From what I have been able to tell, the emulation of atomics in qemu is
based on a single-process, multi-thread model (based on start_exclusive()
in linux-user/main.c,
http://git.qemu.org/?p=qemu.git;a=blob;f=linux-user/main.c;h=95ed11d85c1#l160)
so right now I think that our code is expected not to work on qemu-user.
If that's the case, for our purposes I will simply document that while our
software can be built in a qemu-user environment, it cannot be used and its
testsuite experiences spurious failures.

Thanks for your time,
Jeff

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

end of thread, other threads:[~2016-05-26 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25 12:34 [Qemu-devel] qemu-arm-static, multiprocess, atomic Jeff Epler
2016-05-26 10:42 ` Sergey Fedorov
2016-05-26 11:21   ` Paolo Bonzini
2016-05-26 12:53     ` Sergey Fedorov
2016-05-26 15:16       ` Paolo Bonzini

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