From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] kvm tools: Process virito blk requests in separate thread Date: Thu, 07 Jun 2012 10:47:37 +0200 Message-ID: <4FD06AA9.1030606@redhat.com> References: <1338824453-25260-1-git-send-email-asias.hejun@gmail.com> <1338826065.3292.10.camel@lappy> <4FCF4E90.7050806@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Sasha Levin , Pekka Enberg , Ingo Molnar , Cyrill Gorcunov , kvm@vger.kernel.org To: Asias He Return-path: Received: from mail-pz0-f46.google.com ([209.85.210.46]:49286 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752969Ab2FGIrm (ORCPT ); Thu, 7 Jun 2012 04:47:42 -0400 Received: by dady13 with SMTP id y13so566014dad.19 for ; Thu, 07 Jun 2012 01:47:42 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 07/06/2012 03:38, Asias He ha scritto: >> > I never looked at the kvmtool code, but I think Asias has a point. If >> > the guest submits I/O to lots of devices, they would contend on the >> > single thread. There was a similar proof of concept patch for QEMU that >> > provided substantial benefit. >> > >> > However, it sounds a bit wasteful to have the dedicated thread run with >> > a second eventfd. Would it be hard to just use the virtio-blk ioeventfd >> > directly? > Without this patch, we are already using the virtio-blk ioeventfd > which is being monitored in the shared ioeventfd__thread() thead. Yes, I understood that. :) I'm wondering why it is still necessary to monitor that eventfd in the shared thread. Perhaps you could optionally skip the epoll registration/deregistration in ioeventfd__{add,del}_event. Paolo