From: Mark Williamson <mark.williamson@cl.cam.ac.uk>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] Re: NBD server for QEMU images
Date: Wed, 13 Dec 2006 02:14:48 +0000 [thread overview]
Message-ID: <200612130214.49056.mark.williamson@cl.cam.ac.uk> (raw)
In-Reply-To: <457F0D61.90008@codemonkey.ws>
> >> 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?
Cheers,
Mark
>
> 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
> Qemu-devel@nongnu.org
> 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!
next prev parent reply other threads:[~2006-12-13 2:14 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-12 12:48 [Qemu-devel] NBD server for QEMU images Salvador Fandiño
2006-12-12 13:37 ` Martin Guy
2006-12-12 17:00 ` [Qemu-devel] " Salvador Fandino
2006-12-12 16:58 ` Paul Brook
2006-12-12 17:13 ` Daniel Jacobowitz
2006-12-12 17:33 ` RE : " Sylvain Petreolle
2006-12-12 17:39 ` Paul Brook
2006-12-12 18:54 ` Anthony Liguori
2006-12-12 17:41 ` RE : " Johannes Schindelin
2006-12-12 17:42 ` Daniel Jacobowitz
2006-12-12 18:41 ` [Qemu-devel] Re: RE : " Salvador Fandino
2006-12-13 12:23 ` Jan Marten Simons
2006-12-13 19:03 ` Salvador Fandino
2006-12-13 20:03 ` Jim C. Brown
2006-12-13 22:07 ` Salvador Fandino
2006-12-13 22:55 ` Jim C. Brown
2006-12-14 8:37 ` Salvador Fandino
2006-12-14 14:58 ` Jim C. Brown
2006-12-12 19:00 ` Salvador Fandino
2006-12-12 17:45 ` [Qemu-devel] " Mark Williamson
2006-12-12 19:30 ` Christian MICHON
2006-12-12 15:09 ` Anthony Liguori
2006-12-12 17:32 ` Salvador Fandino
2006-12-12 20:13 ` Anthony Liguori
2006-12-13 2:14 ` Mark Williamson [this message]
2006-12-13 11:37 ` Avi Kivity
2006-12-13 13:19 ` Martin Guy
2006-12-13 13:29 ` Avi Kivity
2006-12-13 19:14 ` Salvador Fandino
2006-12-14 8:34 ` Avi Kivity
2006-12-13 16:58 ` [Qemu-devel] " Mulyadi Santosa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200612130214.49056.mark.williamson@cl.cam.ac.uk \
--to=mark.williamson@cl.cam.ac.uk \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).