Received: from eggs.gnu.org ([2001:4830:134:3::10]:42692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYG19-0007gr-PO for qemu-devel@nongnu.org; Tue, 23 Feb 2016 11:40:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYG14-0003n3-Le for qemu-devel@nongnu.org; Tue, 23 Feb 2016 11:40:55 -0500 Received: from smtp1.ugent.be ([157.193.71.182]:48538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYG14-0003kt-FV for qemu-devel@nongnu.org; Tue, 23 Feb 2016 11:40:50 -0500 Received: from localhost (mcheck3.ugent.be [157.193.71.89]) by smtp1.ugent.be (Postfix) with ESMTP id 8A4EC8248 for ; Tue, 23 Feb 2016 17:40:26 +0100 (CET) Received: from smtp1.ugent.be ([IPv6:::ffff:157.193.71.182]) by localhost (mcheck3.UGent.be [::ffff:157.193.43.11]) (amavisd-new, port 10024) with ESMTP id yNe9WAxFoV9w for ; Tue, 23 Feb 2016 17:40:25 +0100 (CET) Received: from mail.elis.ugent.be (mail.elis.UGent.be [157.193.206.48]) by smtp1.ugent.be (Postfix) with ESMTP id 8FABF82A9 for ; Tue, 23 Feb 2016 17:40:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.elis.ugent.be (Postfix) with ESMTP id 68459918F12 for ; Tue, 23 Feb 2016 17:40:25 +0100 (CET) Received: from mail.elis.ugent.be ([127.0.0.1]) by localhost (mail.elis.ugent.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tPX+bYal+zub for ; Tue, 23 Feb 2016 17:40:25 +0100 (CET) Received: from [157.193.207.10] (laptop-cga1.elis.UGent.be [157.193.207.10]) by mail.elis.ugent.be (Postfix) with ESMTP id 4B033918F10 for ; Tue, 23 Feb 2016 17:40:25 +0100 (CET) From: Cecilia Gonzalez-Alvarez Message-ID: <56CC8B78.6090607@elis.ugent.be> Date: Tue, 23 Feb 2016 17:40:24 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Status of multithreading in user mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi all, I'm planning to use Qemu as a functional simulation frontend for a multicore simulator. Although later plans include full-system simulation, I'd like to start, for the sake of simplicity, with the individual simulation of applications in user mode. I'm interested in targets x86_64 and AArch64, and my general question is: how is the status of multithreading in user mode for those targets? Concretely, can we trust that running multiple threads on qemu-x86_64 and qemu-aarch64 will be reliable most of the time? Going through the mailing list I have the feeling that multithreading and user mode is a recurring issue. I've done some experiments with the latest Qemu from the repository (2.5.50) and although user mode for both architectures is mostly working well, it fails with this particular example for qemu-x86_64: http://users.elis.ugent.be/~cgonzlez/fft.c Compiled with GCC 4.8.4: gcc -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -mno-avx -mno-avx2 -c -o fft.o fft.c gcc fft.o -lm -static -pthread -o fft and executed with 32 threads: qemu-x86_64 fft -p32 sometimes, randomly, stalls on a sys_futex. I don't know if this is a very concrete bug that I should report somewhere else; my main concern is to know if threading support in user mode is almost fully implemented and stable with just some random and unimportant bugs. Best, Cecilia