From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1z5s-000506-NV for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:31:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1z5m-0003MP-QL for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:31:36 -0400 Received: from mail-oa0-x233.google.com ([2607:f8b0:4003:c02::233]:36228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1z5m-0003MJ-LO for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:31:30 -0400 Received: by mail-oa0-f51.google.com with SMTP id j17so10777456oag.10 for ; Tue, 01 Jul 2014 07:31:30 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20140627120129.GO12061@stefanha-thinkpad.muc.redhat.com> <53ADE769.3060903@redhat.com> <20140630080850.GB30969@stefanha-thinkpad.redhat.com> Date: Tue, 1 Jul 2014 16:31:29 +0200 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei Cc: Kevin Wolf , Fam Zheng , "Michael S. Tsirkin" , qemu-devel , Stefan Hajnoczi , Paolo Bonzini On Tue, Jul 1, 2014 at 3:53 PM, Ming Lei wrote: > On Mon, Jun 30, 2014 at 4:08 PM, Stefan Hajnoczi wrote: >> >> Try: >> $ perf record -e syscalls:* --tid >> ^C >> $ perf script # shows the trace log >> >> The difference between syscalls in QEMU 2.0 and qemu.git/master could >> reveal the problem. > > The difference is that there are tons of write() and rt_sigprocmask() > in qemu.git/master, I guess it is related coroutinue. > > For linux-aio, the coroutinue shouldn't be necessary because > io_submit() won't block at most of times for O_DIRECT read/write. You're forgetting about image formats and the other QEMU block layer features like I/O throttling. They do require coroutines. Are you sure it's the extra syscall overhead? Any ideas for avoiding them? The sigprocmask can probably be optimized away since the thread's signal mask remains unchanged most of the time. I'm not sure what is causing the write(). Stefan