[Top][All Lists]

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

Re: [Qemu-devel] Re: NBD server for QEMU images

From: Mark Williamson
Subject: Re: [Qemu-devel] Re: NBD server for QEMU images
Date: Wed, 13 Dec 2006 02:14:48 +0000
User-agent: KMail/1.9.5

> >> And write access works for me.  What's this limitation you speak of?
> >
> > Mounting a partition being served on the same host as read-write can
> > cause deadlocks. From nbd-2.9.0 README file:
> This text is pretty old.  Is this still valid?  This would imply that
> things like loop can result in dead locks.  I don't see why flushing one
> device would depend on the completion of another device.  Otherwise, if
> you had two disk adapters, they would always be operating in lock step.

In the right kind of low memory condition, I guess they might...

> As I've said, I've never seen a problem doing-write with nbd on localhost.

If the NBD device is read-write, this implies it can have associated dirty 
pages.  If you're going to flush those, the kernel is going to have to talk 
to the userspace NBD server.  This is going to require the allocation of 
book-keeping data structures, skbufs, etc and possibly trigger some flushes 
of other dirty data and / or swapping.

I guess you could perhaps get into a loop of needing to flush dirty data to 
make space for data structures needed to flush dirty data?  Which would 
deadlock you quite effectively, but not necessarily be all *that* probably 
under moderate use...

Anybody have any more information on this?


> Regards,
> Anthony Liguori
> > "When you write something to a block device, the kernel will not
> > immediately write that to the physical block device; instead, your
> > changes are written to a cache, which is periodically flushed by a
> > kernel thread, 'kblockd'. If you're using a single-processor system,
> > then you'll have only one kblockd, meaning, the kernel can't write to
> > more than one block device at the same time.
> >
> > If, while your kblockd is emptying the NBD buffer cache, the kernel
> > decides that the cache of the block device your nbd-server is writing to
> > needs to be emptied, then you've got a deadlock."
> >
> > Regards,
> >
> >  - Salva
> _______________________________________________
> Qemu-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/qemu-devel

Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]