From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH v2 4/4] kvm tools: Fix virtio console hangs by removing IRQ injection for tx path Date: Sun, 08 May 2011 20:21:48 +0300 Message-ID: <1304875308.12850.1.camel@lappy> References: <1304860165-28810-1-git-send-email-asias.hejun@gmail.com> <1304860165-28810-5-git-send-email-asias.hejun@gmail.com> <1304874329.10621.45.camel@jaguar> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Asias He , Cyrill Gorcunov , Ingo Molnar , Prasad Joshi , kvm@vger.kernel.org To: Pekka Enberg Return-path: Received: from mail-wy0-f174.google.com ([74.125.82.174]:58592 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753921Ab1EHRWE (ORCPT ); Sun, 8 May 2011 13:22:04 -0400 Received: by wya21 with SMTP id 21so3399429wya.19 for ; Sun, 08 May 2011 10:22:02 -0700 (PDT) In-Reply-To: <1304874329.10621.45.camel@jaguar> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 2011-05-08 at 20:05 +0300, Pekka Enberg wrote: > On Sun, 2011-05-08 at 21:09 +0800, Asias He wrote: > > As virtio spec says: > > > > """ > > Because this is high importance and low bandwidth, the current Linux > > implementation polls for the buffer to be used, rather than waiting > > for an interrupt, simplifying the implementation signicantly. > > """ > > > > drivers/char/virtio_console.c > > send_buf() { > > ... > > /* Tell Host to go! */ > > virtqueue_kick(out_vq); > > ... > > while (!virtqueue_get_buf(out_vq, &len)) > > cpu_relax(); > > ... > > } > > > > The console hangs can simply be reproduced by yes command which > > gives tremendous console IOs and IRQs. > > Sasha, does this fix the hangs you were seeing? We should re-enable > virtio console unconditionally if this does - that increases test > coverage for virtio console. I'm seeing no more hangs, but why enable it unconditionally? Maybe enable it by default, but we shouldn't force the activation of virtio modules if the user doesn't want them. -- Sasha.