From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [PATCH 1/3] kvm tools: Make virtio-net kvm__irq_line thread safe Date: Fri, 29 Apr 2011 14:47:57 +0400 Message-ID: References: <1304058985-13833-1-git-send-email-asias.hejun@gmail.com> <4DBA6519.5070509@gmail.com> <1304063606.10069.7.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Sasha Levin , Asias He , Ingo Molnar , Prasad Joshi , "kvm@vger.kernel.org" To: Pekka Enberg Return-path: Received: from mail-pv0-f174.google.com ([74.125.83.174]:38374 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753121Ab1D2Kr5 convert rfc822-to-8bit (ORCPT ); Fri, 29 Apr 2011 06:47:57 -0400 Received: by pvg12 with SMTP id 12so2237968pvg.19 for ; Fri, 29 Apr 2011 03:47:57 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: i suspect so, threadpool makes all things to be more async as they were before and proper lockings does matter, i could test any patches at evening, and i must admit i never get well uderstanding on virtio device operations yet (in terms of virtio ring :) On Friday, April 29, 2011, Pekka Enberg wrote: > On Fri, Apr 29, 2011 at 1:02 PM, Cyrill Gorcunov = wrote: >> So, if I understand all the things correct -- making virtio devices = to >> belong separated irqs >> issued some race conditions on read\write operations between host an= d >> guest and adding >> thread pool revealed it, right? (because previously we were doing al= l >> the work inside i/o >> path on guest site). > > So does reverting commit a37089da817ce7aad9789aeb9fc09b68e088ad9a > ("kvm tools: Use threadpool for virtio-net") fix things? I think the > problem here is that now RX path relies on VIRTIO_PCI_QUEUE_NOTIFY to > happen in order for it to trigger KVM_IRQ_LINE which is wrong. Using > shared IRQs obviously masks the problem which is why reverting > Cyrill's commit makes the problem go away. > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Pekka >