Skip to content

tools/xenstore: drop TDB

Juergen Gross xen-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest19 patches 19 repliesIn review
  2. v325 patches 58 repliesSuperseded
  3. v218 patches 17 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v111 patches27 repliesSuperseded

Changes in v4 from the cover letter

- addressed comments
- patches 1-7 already applied
- dropped patch 15 of v3
- add patches 18+19

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19tools/xenstore: make hashtable key parameter consttools/xenstore/hashtable.c tools/xenstore/hashtable.h+5 -41 reply
2/19tools/xenstore: let hashtable_add() fail in case of existing entrytools/xenstore/hashtable.c tools/xenstore/hashtable.h+28 -180 replies
3/19tools/xenstore: add hashtable_replace() functiontools/xenstore/hashtable.c tools/xenstore/hashtable.h+35 -00 replies
4/19tools/xenstore: drop use of tdbtools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_transaction.c+62 -1000 replies
5/19tools/xenstore: remove tdb codetools/xenstore/Makefile.common tools/xenstore/tdb.c tools/xenstore/tdb.h+1 -18810 replies
6/19tools/xenstore: let db_delete() return voidtools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_transaction.c+11 -180 replies
7/19tools/xenstore: change talloc_free() to take a const pointertools/xenstore/talloc.c tools/xenstore/talloc.h+8 -61 reply
8/19tools/xenstore: move copying of node data out of db_fetch()tools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_transaction.c+34 -341 reply
9/19tools/xenstore: rework struct xs_tdb_record_hdrtools/xenstore/utils.h tools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h +1 more+53 -281 reply
10/19tools/xenstore: don't use struct node_perms in struct nodetools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_domain.c +2 more+83 -591 reply
11/19tools/xenstore: use struct node_hdr in struct nodetools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_domain.c +1 more+72 -721 reply
12/19tools/xenstore: alloc new memory in domain_adjust_node_perms()tools/xenstore/xenstored_core.c tools/xenstore/xenstored_domain.c tools/xenstore/xenstored_domain.h+32 -101 reply
13/19tools/xenstore: introduce read_node_const()tools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_domain.c +2 more+90 -341 reply
14/19tools/xenstore: merge get_spec_node() into get_node_canonicalized()tools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_watch.c+26 -411 reply
15/19tools/xenstore: merge is_valid_nodename() into canonicalize()tools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_watch.c+50 -571 reply
16/19tools/xenstore: rework get_node()tools/xenstore/xenstored_core.c+25 -321 reply
17/19tools/xenstore: introduce get_node_const()tools/xenstore/xenstored_core.c+24 -111 reply
18/19tools/config: add XEN_RUN_STORED to config.hconfigure m4/paths.m4 tools/config.h.in +3 more+14 -22 replies
18/19tools/config: add XEN_RUN_STORED to config.hconfig/Paths.mk.in configure m4/paths.m4 +4 more+14 -30 replies
19/19tools/xenstore: move xenstored sources into dedicated directory.gitignore MAINTAINERS stubdom/Makefile +31 more+98 -694 replies

Reviews trailers per patch

19 of 20 patches have a Reviewed-by or Acked-by.

PatchJulien GrallAnthony PERARD
1/19R-b
2/19R-b
3/19A-b
4/19R-b
5/19R-b
6/19R-b
7/19R-b
8/19R-b
9/19R-b
10/19R-b
11/19R-b
12/19R-b
13/19R-b
14/19R-b
15/19R-b
16/19R-b
17/19R-b
18/19R-b R-b
18/19R-b R-b
19/19

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/19] 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.

Changes in V4:
- addressed comments
- patches 1-7 already applied
- dropped patch 15 of v3
- add patches 18+19

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

Juergen Gross (19):
tools/xenstore: make hashtable key parameter 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: 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_const() 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/config: add XEN_RUN_STORED to config.h tools/xenstore: move xenstored sources into dedicated directory

 .gitignore                                    |    2 +-
 MAINTAINERS                                   |    1 +
 configure                                     |    5 +
 m4/paths.m4                                   |    1 +
 stubdom/Makefile                              |    4 +-
 tools/Makefile                                |    1 +
 tools/config.h.in                             |    3 +
 tools/configure                               |    5 +
 tools/libs/store/Makefile                     |    1 -
 tools/xenstore/Makefile                       |   30 +-
 tools/xenstore/Makefile.common                |   31 -
 tools/xenstore/tdb.c                          | 1748 -----------------
 tools/xenstore/tdb.h                          |  132 --
 tools/xenstored/Makefile                      |   48 +
 tools/xenstored/Makefile.common               |   29 +
 tools/{xenstore => xenstored}/README          |    0
 .../control.c}                                |    8 +-
 .../control.h}                                |    0
 .../xenstored_core.c => xenstored/core.c}     |  643 +++---
 .../xenstored_core.h => xenstored/core.h}     |   77 +-
 .../xenstored_domain.c => xenstored/domain.c} |   44 +-
 .../xenstored_domain.h => xenstored/domain.h} |    8 +-
 tools/{xenstore => xenstored}/hashtable.c     |   60 +-
 tools/{xenstore => xenstored}/hashtable.h     |   24 +-
 tools/{xenstore => xenstored}/list.h          |    0
 .../xenstored_lu.c => xenstored/lu.c}         |    8 +-
 .../xenstored_lu.h => xenstored/lu.h}         |    0
 .../lu_daemon.c}                              |    4 +-
 .../lu_minios.c}                              |    2 +-
 .../xenstored_minios.c => xenstored/minios.c} |    2 +-
 .../xenstored_osdep.h => xenstored/osdep.h}   |    0
 .../xenstored_posix.c => xenstored/posix.c}   |    4 +-
 tools/{xenstore => xenstored}/talloc.c        |   10 +-
 tools/{xenstore => xenstored}/talloc.h        |    4 +-
 .../{xenstore => xenstored}/talloc_guide.txt  |    0
 .../transaction.c}                            |   57 +-
 .../transaction.h}                            |    2 +-
 tools/{xenstore => xenstored}/utils.c         |    0
 tools/{xenstore => xenstored}/utils.h         |    9 -
 .../xenstored_watch.c => xenstored/watch.c}   |   45 +-
 .../xenstored_watch.h => xenstored/watch.h}   |    5 +-
 .../include => xenstored}/xenstore_state.h    |    0
 42 files changed, 666 insertions(+), 2391 deletions(-)
 delete mode 100644 tools/xenstore/Makefile.common
 delete mode 100644 tools/xenstore/tdb.c
 delete mode 100644 tools/xenstore/tdb.h
 create mode 100644 tools/xenstored/Makefile
 create mode 100644 tools/xenstored/Makefile.common
 rename tools/{xenstore => xenstored}/README (100%)
 rename tools/{xenstore/xenstored_control.c => xenstored/control.c} (98%)
 rename tools/{xenstore/xenstored_control.h => xenstored/control.h} (100%)
 rename tools/{xenstore/xenstored_core.c => xenstored/core.c} (88%)
 rename tools/{xenstore/xenstored_core.h => xenstored/core.h} (88%)
 rename tools/{xenstore/xenstored_domain.c => xenstored/domain.c} (98%)
 rename tools/{xenstore/xenstored_domain.h => xenstored/domain.h} (95%)
 rename tools/{xenstore => xenstored}/hashtable.c (89%)
 rename tools/{xenstore => xenstored}/hashtable.h (89%)
 rename tools/{xenstore => xenstored}/list.h (100%)
 rename tools/{xenstore/xenstored_lu.c => xenstored/lu.c} (98%)
 rename tools/{xenstore/xenstored_lu.h => xenstored/lu.h} (100%)
 rename tools/{xenstore/xenstored_lu_daemon.c => xenstored/lu_daemon.c} (97%)
 rename tools/{xenstore/xenstored_lu_minios.c => xenstored/lu_minios.c} (98%)
 rename tools/{xenstore/xenstored_minios.c => xenstored/minios.c} (97%)
 rename tools/{xenstore/xenstored_osdep.h => xenstored/osdep.h} (100%)
 rename tools/{xenstore/xenstored_posix.c => xenstored/posix.c} (98%)
 rename tools/{xenstore => xenstored}/talloc.c (99%)
 rename tools/{xenstore => xenstored}/talloc.h (98%)
 rename tools/{xenstore => xenstored}/talloc_guide.txt (100%)
 rename tools/{xenstore/xenstored_transaction.c => xenstored/transaction.c} (93%)
 rename tools/{xenstore/xenstored_transaction.h => xenstored/transaction.h} (98%)
 rename tools/{xenstore => xenstored}/utils.c (100%)
 rename tools/{xenstore => xenstored}/utils.h (89%)
 rename tools/{xenstore/xenstored_watch.c => xenstored/watch.c} (90%)
 rename tools/{xenstore/xenstored_watch.h => xenstored/watch.h} (93%)
 rename tools/{xenstore/include => xenstored}/xenstore_state.h (100%)
Signature · 1 line
2.35.3