Using TDB for storing the Xenstore nodes is adding more complexity
instead of removing it. With keeping the data in memory only, the main
reason for using TDB has disappeared.
This series is replacing TDB with a hashlist referencing directly
individually allocated Xenstore nodes.
This in turn allows to use references of the stored nodes instead of
copying them in case only read access is needed. Some simple tests
using the test-xenstore utility have shown no single test being slower
with this series applied, but some tests experienced up to 10% better
performance.
Changes in V2:
- addressed comments
- split former patch 9 into 2 patches
- added patches 13-18
Juergen Gross (18):
tools/xenstore: explicitly specify create or modify for tdb_store()
tools/xenstore: replace key in struct node with data base name
tools/xenstore: let transaction_prepend() return the name for access
tools/xenstore: rename do_tdb_delete() and change parameter type
tools/xenstore: rename do_tdb_write() and change parameter type
tools/xenstore: switch get_acc_data() to use name instead of key
tools/xenstore: add wrapper for tdb_fetch()
tools/xenstore: make hashtable key and value parameters const
tools/xenstore: let hashtable_add() fail in case of existing entry
tools/xenstore: add hashtable_replace() function
tools/xenstore: drop use of tdb
tools/xenstore: remove tdb code
tools/xenstore: let db_delete() return void
tools/xenstore: move copying of node data out of db_fetch()
tools/xenstore: rework struct xs_tdb_record_hdr
tools/xenstore: don't use struct node_perms in struct node
tools/xenstore: use struct node_hdr in struct node
tools/xenstore: add nocopy flag to node read functions
tools/xenstore/Makefile.common | 2 +-
tools/xenstore/hashtable.c | 60 +-
tools/xenstore/hashtable.h | 20 +-
tools/xenstore/tdb.c | 1748 ------------------------
tools/xenstore/tdb.h | 132 --
tools/xenstore/utils.h | 9 -
tools/xenstore/xenstored_core.c | 498 ++++---
tools/xenstore/xenstored_core.h | 81 +-
tools/xenstore/xenstored_domain.c | 20 +-
tools/xenstore/xenstored_transaction.c | 95 +-
tools/xenstore/xenstored_transaction.h | 5 +-
tools/xenstore/xenstored_watch.c | 11 +-
12 files changed, 427 insertions(+), 2254 deletions(-)
delete mode 100644 tools/xenstore/tdb.c
delete mode 100644 tools/xenstore/tdb.h
--
2.35.3