[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <874nylua4z.fsf@rustcorp.com.au>
Date: Thu, 03 Nov 2011 14:31:48 +1030
From: Rusty Russell <rusty@...tcorp.com.au>
To: Christoph Hellwig <hch@...radead.org>
Cc: "Michael S. Tsirkin" <mst@...hat.com>,
Christoph Hellwig <hch@...radead.org>,
Chris Wright <chrisw@...s-sol.org>,
Jens Axboe <axboe@...nel.dk>,
Stefan Hajnoczi <stefanha@...ux.vnet.ibm.com>,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] virtio: support unlocked queue kick
On Wed, 2 Nov 2011 03:25:44 -0400, Christoph Hellwig <hch@...radead.org> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists