From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH] kvm tools: Process virito blk requests in separate thread Date: Tue, 29 Nov 2011 16:36:49 +0200 Message-ID: <1322577409.7003.7.camel@lappy> References: <1322576888-7451-1-git-send-email-asias.hejun@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Pekka Enberg , Cyrill Gorcunov , Ingo Molnar , kvm@vger.kernel.org To: Asias He Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:45833 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755436Ab1K2OhA (ORCPT ); Tue, 29 Nov 2011 09:37:00 -0500 Received: by bkas6 with SMTP id s6so591443bka.19 for ; Tue, 29 Nov 2011 06:36:58 -0800 (PST) In-Reply-To: <1322576888-7451-1-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 2011-11-29 at 22:28 +0800, Asias He wrote: > Currently, all blk requests are processed in notify_vq() which is in > the context of ioeventfd thread: ioeventfd__thread(). The processing > in notify_vq() may take a long time to complete. > > We should make notify_vq() return as soon as possible, since all devices > are sharing the single ioeventfd thread. Otherwise, it will block other > device's notify_vq() being called and starve other devices. > > In virtio net's notify_vq(), we simply signal the tx/rx handle thread > and return. Why not use the threadpool? > > This patch makes virtio blk's notify_vq() just notify the blk thread > instead of doing the real hard read/write work. Tests show that the > overhead of the notification operations introduced by this patch is > small. > > Signed-off-by: Asias He > --- -- Sasha.