r317: Update status of deadlock issue
[nbd.git] / README
diff --git a/README b/README
index da86a39..5958873 100644 (file)
--- a/README
+++ b/README
@@ -21,6 +21,14 @@ device nodes:
 (if you need more than one NBD device, repeat the above command for nb1,
 nb2, ...)
 
+Since there's a problem with nbd and the (default) cfq I/O scheduler,
+you may want to set it to deadline:
+
+echo 'deadline' > /sys/block/nbd0/queue/scheduler
+
+(again, repeat the above for nbd1, nbd2, etc, if you need more than one
+device)
+
 Next, start the server. You can use a file or a block device for that:
 
 nbd-server <port> <filename>
@@ -68,6 +76,8 @@ This configuration file is expected to be found at
        readonly = false
        multifile = false
        copyonwrite = false
+       prerun = dd if=/dev/zero of=%s bs=1k count=500
+       postrun = rm -f %s
 [otherexport]
        exportname = /export/nbd/experiment
        port = 12346
@@ -114,3 +124,7 @@ 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.
+
+A kernel patch exists[2] to create a separate kernel thread for NBD
+writes which woul fix this problem; however, it has not made it into
+mainline yet.