DragonFly BSD
DragonFly kernel List (threaded) for 2011-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [gsoc] Virtio Block device benchmarks


From: Tim Bisson <bissont@xxxxxxx>
Date: Sat, 04 Jun 2011 12:28:21 -0700

On Jun 3, 2011, at 3:45 PM, Stéphanie Ouillon wrote:

> 
> I just quickly looked through the code to see what is the problem :
> 
> This error message appears in virtio-blk.c, in the virtio_blk_execute function, at ligne 235.
> virtio_enqueue_reserve return a bad value ( <>0 ) at ligne 535 of virtio.c if (qe==NULL), that is to say, that there is no free place anymore in the virtqueue.
> 
> I'll look at it more precisely later during the week-end, but if you have some ideas about it...
> 

I believe I can shed more light on this. The problem is that we're passing requests to the driver faster than we can process them and eventually we run out of room.

I thought I had solved the problem by adding a queue for requests (vbb_queue). When trying to execute a request, if there is no room in the virtqueue, we requeue the request on the vbb_queue. I'm sure there's a better solution, but that's what I came up with.

One thing you could try: Track the number of slots in the virtqueue and the number outstanding requests on the virtqueue Then, inside virtio_disk_strategy() don't call virtio_blk_execute() if the virtqueue is full. Eventually all requests will eventually be executed because virtio_blk_execute() is also called in virtio_blk_vq_done().

Tim



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]