From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X21Fb-0003dg-AI for qemu-devel@nongnu.org; Tue, 01 Jul 2014 12:49:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X21FR-0003wE-D2 for qemu-devel@nongnu.org; Tue, 01 Jul 2014 12:49:47 -0400 Received: from mail-qg0-x231.google.com ([2607:f8b0:400d:c04::231]:41163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X21FR-0003w2-8Y for qemu-devel@nongnu.org; Tue, 01 Jul 2014 12:49:37 -0400 Received: by mail-qg0-f49.google.com with SMTP id f51so3522637qge.22 for ; Tue, 01 Jul 2014 09:49:36 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53B2E69A.1090707@redhat.com> Date: Tue, 01 Jul 2014 18:49:30 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20140627120129.GO12061@stefanha-thinkpad.muc.redhat.com> <53ADE769.3060903@redhat.com> <20140630080850.GB30969@stefanha-thinkpad.redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 , Stefan Hajnoczi Cc: Kevin Wolf , Fam Zheng , qemu-devel , Stefan Hajnoczi , "Michael S. Tsirkin" Il 01/07/2014 16:49, Ming Lei ha scritto: > Let me provide some data when running randread(bs 4k, libaio) > from VM for 10sec: > > 1), qemu.git/master > - write(): 731K > - rt_sigprocmask(): 417K > - read(): 21K > - ppoll(): 10K > - io_submit(): 5K > - io_getevents(): 4K > > 2), qemu 2.0 > - write(): 9K > - read(): 28K > - ppoll(): 16K > - io_submit(): 12K > - io_getevents(): 10K > >> > 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(). > I am investigating it... I would guess sigprocmask is getcontext (from qemu_coroutine_new) and write is aio_notify (from qemu_bh_schedule). Both can be eliminated by introducing a fast path in bdrv_aio_{read,write}v, that bypasses coroutines in the common case of no I/O throttling, no copy-on-write, etc. Paolo