From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAN5K-0003Ww-Tj for qemu-devel@nongnu.org; Thu, 14 Apr 2011 09:59:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QAN5J-0006xT-SP for qemu-devel@nongnu.org; Thu, 14 Apr 2011 09:59:50 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:43808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAN5J-0006xF-PP for qemu-devel@nongnu.org; Thu, 14 Apr 2011 09:59:49 -0400 Received: by iwl42 with SMTP id 42so1832433iwl.4 for ; Thu, 14 Apr 2011 06:59:48 -0700 (PDT) Message-ID: <4DA6FDD1.4040307@codemonkey.ws> Date: Thu, 14 Apr 2011 08:59:45 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20110413201615.GA15989@volta.aurel32.net> <4DA69EDB.8080600@web.de> <4DA6FA65.4010503@redhat.com> In-Reply-To: <4DA6FA65.4010503@redhat.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/3] io-thread optimizations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Paolo Bonzini , Marcelo Tosatti , Jan Kiszka , qemu-devel@nongnu.org, Aurelien Jarno On 04/14/2011 08:45 AM, Avi Kivity wrote: > On 04/14/2011 10:14 AM, Jan Kiszka wrote: >> On 2011-04-13 22:16, Aurelien Jarno wrote: >> > On Mon, Apr 11, 2011 at 10:27:41PM +0200, Jan Kiszka wrote: >> >> These patches were posted before. They bring down the overhead of >> the >> >> io-thread mode for TCG here, specifically when emulating SMP. >> >> >> >> The major change in this version, besides rebasing, is the >> exclusion of >> >> KVM from the main loop polling optimization. >> >> >> >> >> >> >> >> Jan Kiszka (3): >> >> Do not drop global mutex for polled main loop runs >> >> Poll main loop after I/O events were received >> >> Do not kick vcpus in TCG mode >> >> >> >> cpus.c | 2 +- >> >> sysemu.h | 2 +- >> >> vl.c | 22 ++++++++++++++++------ >> >> 3 files changed, 18 insertions(+), 8 deletions(-) >> >> >> > >> > Thanks for working on improving the io-thread with TCG. Your patches >> > make sense, but they don't seems to fix the slowdown observed when >> > enabling the io-thread. Well maybe they were not supposed to. This is >> > for example the results of netperf between guest and host using >> virtio: >> > >> > no io-thread 122 MB/s >> > io-thread 97 MB/s >> > io-thread + patches 98 MB/s >> > >> >> Can you capture ftraces of io-thread enabled& disabled runs? They just >> need to cover a hand full of frames. >> > > Also interesting would be the context switch rates on the host. > > If they're large, perhaps using user-space threading instead of native > threads would help. I still suspect mitigation as the culprit here. Select is going to get to run more often which means more interrupt generation. I bet if you count the number of packets per interrupt/notify you'll find that less batching is occurring. Regards, Anthony Liguori