WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-tools

[Xen-tools] [BUNDLE] Change transaction semantics, implementation

To: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Subject: [Xen-tools] [BUNDLE] Change transaction semantics, implementation
From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Date: Wed, 21 Sep 2005 16:07:15 +1000
Cc: Xen Tools <xen-tools@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 21 Sep 2005 06:05:00 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-tools-request@lists.xensource.com?subject=help>
List-id: Xen control tools developers <xen-tools.lists.xensource.com>
List-post: <mailto:xen-tools@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-tools>, <mailto:xen-tools-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-tools>, <mailto:xen-tools-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-tools-bounces@xxxxxxxxxxxxxxxxxxx
OK, this is a series of three patches.  The first introduces a speed
test, which opens a transaction on "/", creates a directory, puts 50
entries in it, and commits the transaction.  It does this N times, and
the effect of xenstored using separate files and journalling filesystems
shows: N=100 takes 33 minutes(!) on my laptop, which is a level of
unprecedented suckage.

So the second patch changes over to use a TDB, rather than a directory
hierarchy for storage, and changes transaction semantics.  This is much
friendlier for NFS, more compact, and much, much faster.  The
transaction implementation is naive: it applies to the whole store, and
if someone has made a change since your transaction started, you get
EAGAIN.  We can get clever with merging later.  Previously we used a
lock to implement transactions, with deadlock protection by breaking the
lock after one second and returning ETIMEDOUT.  Unfortunately, the store
was so slow that we were seeing this (and treating it as a soft error,
which makes it worse, risking livelock), and Christian pointed out that
this model is also flawed in theory: domains can be paused for infinite
duration.  So, transaction_end can now fail with EAGAIN at any time: you
have to loop.  Sorry, I tried.

The final patch in the series cleans up the callers.  Me speak little
python, so watch those parts: I made xstransact.commit() return true or
false, rather than raise an exception, which seems more useful for the
python interface.

Due to size, attached as a "bundle": you should be able to import using
"unbundle".  Hope that works!

Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman

Attachment: out
Description: Text document

_______________________________________________
Xen-tools mailing list
Xen-tools@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-tools
<Prev in Thread] Current Thread [Next in Thread>