From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH 2/5] virtio: support unlocked queue kick Date: Thu, 03 Nov 2011 14:31:48 +1030 Message-ID: <874nylua4z.fsf@rustcorp.com.au> References: <20111005195403.407628164@bombadil.infradead.org> <20111005195529.964397366@bombadil.infradead.org> <87r52qgaf3.fsf@rustcorp.com.au> <20111006131828.GC19023@redhat.com> <20111101144045.GA15433@redhat.com> <87ty6ntdmf.fsf@rustcorp.com.au> <20111102072544.GA6967@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Michael S. Tsirkin" , Christoph Hellwig , Chris Wright , Jens Axboe , Stefan Hajnoczi , kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from ozlabs.org ([203.10.76.45]:57347 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751324Ab1KCE6h (ORCPT ); Thu, 3 Nov 2011 00:58:37 -0400 In-Reply-To: <20111102072544.GA6967@infradead.org> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 2 Nov 2011 03:25:44 -0400, Christoph Hellwig wrote: > On Wed, Nov 02, 2011 at 01:49:36PM +1030, Rusty Russell wrote: > > I thought it was still a WIP? > > The whole series - yes. This patch (and the serial number rewrite): no > - these are pretty much rock solid. OK, thanks. > > Since the problem is contention on the lock inside the block layer, the > > simplest solution is to have a separate lock to protect the virtqueue. > > As long as we still use a ->request_fn based driver that is not going > to buy us anything, in fact it's going to make things worse. Of course... > With the ->make_request_fn based driver vlkb->lock does't protect > anything but the virtuequeue anyway, but not having to take it > over the wakeup there is a) done easily and b) neatly fits the model. It adds YA API though. But I can't better it. Doing the "should we kick" check outside the lock is problematic, and doing it inside every add() is inefficient. So let's change the API for everyone, into: bool virtqueue_should_kick(struct virtqueue *vq); void virtqueue_kick(struct virtqueue *vq); Patch series coming... Thanks, Rusty.