[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 00/25] tools/xenstore: drop TDB



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.

Note that this series is based on top of [1].

Changes in V3:
- addressed comments
- add patches 14+15
- replace patch 18 of v2 with patches 20-25

Changes in V2:
- addressed comments
- split former patch 9 into 2 patches
- added patches 13-18

[1]: https://lists.xen.org/archives/html/xen-devel/2023-07/threads.html#01625

Juergen Gross (25):
  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: change talloc_free() to take a const pointer
  tools/xenstore: make data parameter of db_write() const
  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: alloc new memory in domain_adjust_node_perms()
  tools/xenstore: introduce read_node_nocopy()
  tools/xenstore: merge get_spec_node() into get_node_canonicalized()
  tools/xenstore: merge is_valid_nodename() into canonicalize()
  tools/xenstore: rework get_node()
  tools/xenstore: introduce get_node_const()

 tools/xenstore/Makefile.common         |    2 +-
 tools/xenstore/hashtable.c             |   62 +-
 tools/xenstore/hashtable.h             |   20 +-
 tools/xenstore/talloc.c                |    8 +-
 tools/xenstore/talloc.h                |    4 +-
 tools/xenstore/tdb.c                   | 1748 ------------------------
 tools/xenstore/tdb.h                   |  132 --
 tools/xenstore/utils.h                 |    9 -
 tools/xenstore/xenstored_core.c        |  704 +++++-----
 tools/xenstore/xenstored_core.h        |   86 +-
 tools/xenstore/xenstored_domain.c      |   33 +-
 tools/xenstore/xenstored_transaction.c |  110 +-
 tools/xenstore/xenstored_transaction.h |    5 +-
 tools/xenstore/xenstored_watch.c       |   42 +-
 tools/xenstore/xenstored_watch.h       |    3 +-
 15 files changed, 591 insertions(+), 2377 deletions(-)
 delete mode 100644 tools/xenstore/tdb.c
 delete mode 100644 tools/xenstore/tdb.h

-- 
2.35.3




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.