This is an overture of a major rework of the xenstored internals I've
had lying around for about one year now. It has been blocked by all
the XSA work and live update stuff.
This series has not seen much testing. It is rather meant as a
starting point for discussions whether the approach especially to
drop tdb is accepted or not.
The main reason to drop using tdb is to be able to have references
between nodes, which will be rather interesting for adding the
capability to do live updates even with open transactions.
Other optimizations made possible by this would be to e.g.:
- hook watches directly to nodes, dropping the need to scan all
active watches when modifying a node
- switch transaction handling to a rather simple copy-on-write
scheme
- avoid lots of node copying when traversing the tree
- drop the list children names by replacing it with a linked list of
child nodes
Patches 1 and 2 are in this series basically because they are in my
todo list for xenstored and they need to wait for the tree to be opened
anyway before being able to go in.
Patch 3 is some preparation for removing tdb, but could be taken as a
cleanup patch even without dropping tdb.
In case no one is objecting to drop tdb I'll continue with some further
optimizations.
Juergen Gross (4):
tools/xenstore: simplify xenstored main loop
tools/xenstore: claim resources when running as daemon
tools/xenstore: rework hashtable interfaces
tools/xenstore: drop use of tdb
.gitignore | 2 -
tools/xenstore/Makefile | 9 +-
tools/xenstore/hashtable.c | 234 ++--
tools/xenstore/hashtable.h | 137 +-
tools/xenstore/hashtable_private.h | 85 --
tools/xenstore/tdb.c | 1748 ------------------------
tools/xenstore/tdb.h | 134 --
tools/xenstore/xenstored_core.c | 313 ++---
tools/xenstore/xenstored_core.h | 30 +-
tools/xenstore/xenstored_domain.c | 11 +-
tools/xenstore/xenstored_minios.c | 4 +
tools/xenstore/xenstored_posix.c | 46 +
tools/xenstore/xenstored_transaction.c | 71 +-
tools/xenstore/xenstored_transaction.h | 4 +-
tools/xenstore/xs_tdb_dump.c | 86 --
15 files changed, 426 insertions(+), 2488 deletions(-)
delete mode 100644 tools/xenstore/hashtable_private.h
delete mode 100644 tools/xenstore/tdb.c
delete mode 100644 tools/xenstore/tdb.h
delete mode 100644 tools/xenstore/xs_tdb_dump.c
--
2.26.2