xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/12] xenstore: support reading directory with many children
@ 2016-12-05  7:48 Juergen Gross
  2016-12-05  7:48 ` [PATCH v4 01/12] xenstore: modify add_change_node() parameter types Juergen Gross
                   ` (12 more replies)
  0 siblings, 13 replies; 31+ messages in thread
From: Juergen Gross @ 2016-12-05  7:48 UTC (permalink / raw)
  To: xen-devel
  Cc: Juergen Gross, sstabellini, wei.liu2, George.Dunlap,
	andrew.cooper3, ian.jackson, tim, jbeulich

Reading the children list of a xenstore node with the length of that
list exceeding 4096 bytes is currently not possible. This can be a
problem for a large host with a huge number of domains as Xen tools
will no longer by capable to scan some directories of xenstore (e.g.
/local/domain).

This patch series adds a new xs wire command to read a directory
in multiple chunks. libxenstore is modified in a compatible way to
show an unmodified result in case xenstored doesn't support the new
command.

As there have been questions regarding handling of memory allocation
failures I've decided to add proper handling of those, requiring some
more rework.

The patch set has been verified to work by using the following shell script:

xenstore-write /test "test"

for i in `seq 100 500`
do
    xenstore-write /test/entry_with_very_long_name_$i $i
done

xenstore-ls
xenstore-rm /test

Xenstore has been verified to work by starting multiple domain types.
Especially HVM with qemu-stubdom has been tested as this configuration
seems to be rather sensible to concurrent transactions.

Changes in V4:
- move introduction of XS_NEXT_ENTRY from patch 5 to patch 7 and rename it
  to XS_TYPE_COUNT as rewuested by Jan Beulich
- patch 9: don't remove functions from libxenstore as requested by Andrew
  Cooper
- patch 12: add some more allocation failure checks

Changes in V3:
- remove patch 1, as it has been applied already
- new patches 7-12
- some minor modifications in patch 5 (was 6) as suggested by Jan Beulich

Changes in V2:
- complete rework as suggested by Jan Beulich: don't use transactions
  for consistency, but a per-node generation count
- fix a (minor?) problem in transaction code regarding watches (patch 1)

Juergen Gross (12):
  xenstore: modify add_change_node() parameter types
  xenstore: call add_change_node() directly when writing node
  xenstore: use common tdb record header in xenstore
  xenstore: add per-node generation counter
  xenstore: add support for reading directory with many children
  xenstore: support XS_DIRECTORY_PART in libxenstore
  xenstore: use array for xenstore wire command handling
  xenstore: let command functions return error or success
  xenstore: make functions static
  xenstore: add helper functions for wire argument parsing
  xenstore: add small default data buffer to internal struct
  xenstore: handle memory allocation failures in xenstored

 tools/xenstore/include/xenstore_lib.h  |   9 +
 tools/xenstore/xenstored_core.c        | 824 ++++++++++++++++++---------------
 tools/xenstore/xenstored_core.h        |  23 +-
 tools/xenstore/xenstored_domain.c      | 218 ++++-----
 tools/xenstore/xenstored_domain.h      |  14 +-
 tools/xenstore/xenstored_transaction.c | 106 +++--
 tools/xenstore/xenstored_transaction.h |   8 +-
 tools/xenstore/xenstored_watch.c       |  89 ++--
 tools/xenstore/xenstored_watch.h       |   6 +-
 tools/xenstore/xs.c                    | 191 +++++++-
 tools/xenstore/xs_lib.c                | 112 -----
 tools/xenstore/xs_tdb_dump.c           |  11 +-
 xen/include/public/io/xs_wire.h        |   3 +
 13 files changed, 890 insertions(+), 724 deletions(-)

-- 
2.10.2


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2017-01-09 18:02 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05  7:48 [PATCH v4 00/12] xenstore: support reading directory with many children Juergen Gross
2016-12-05  7:48 ` [PATCH v4 01/12] xenstore: modify add_change_node() parameter types Juergen Gross
2016-12-05  7:48 ` [PATCH v4 02/12] xenstore: call add_change_node() directly when writing node Juergen Gross
2016-12-05 10:01   ` Wei Liu
2016-12-05  7:48 ` [PATCH v4 03/12] xenstore: use common tdb record header in xenstore Juergen Gross
2016-12-05  7:48 ` [PATCH v4 04/12] xenstore: add per-node generation counter Juergen Gross
2017-01-09 14:38   ` Jan Beulich
     [not found]   ` <5873AE81020000780012E350@suse.com>
2017-01-09 16:02     ` Juergen Gross
2017-01-09 16:10       ` Jan Beulich
     [not found]       ` <5873C3ED020000780012E4D5@suse.com>
2017-01-09 16:20         ` Juergen Gross
2016-12-05  7:48 ` [PATCH v4 05/12] xenstore: add support for reading directory with many children Juergen Gross
2017-01-09 16:40   ` Ian Jackson
2017-01-09 18:01     ` Juergen Gross
2016-12-05  7:48 ` [PATCH v4 06/12] xenstore: support XS_DIRECTORY_PART in libxenstore Juergen Gross
2016-12-05  7:48 ` [PATCH v4 07/12] xenstore: use array for xenstore wire command handling Juergen Gross
2016-12-05  8:43   ` Jan Beulich
2016-12-05  9:41     ` Wei Liu
2016-12-05  7:48 ` [PATCH v4 08/12] xenstore: let command functions return error or success Juergen Gross
2016-12-05  7:48 ` [PATCH v4 09/12] xenstore: make functions static Juergen Gross
2016-12-05 10:02   ` Wei Liu
2016-12-05  7:48 ` [PATCH v4 10/12] xenstore: add helper functions for wire argument parsing Juergen Gross
2016-12-05  7:48 ` [PATCH v4 11/12] xenstore: add small default data buffer to internal struct Juergen Gross
2016-12-05  7:48 ` [PATCH v4 12/12] xenstore: handle memory allocation failures in xenstored Juergen Gross
2016-12-05 10:03   ` Wei Liu
2016-12-05 10:15     ` Juergen Gross
2016-12-05 10:16       ` Wei Liu
2016-12-05 10:45         ` Wei Liu
2016-12-05 12:05 ` [PATCH v4 00/12] xenstore: support reading directory with many children Wei Liu
2016-12-05 18:19   ` Andrew Cooper
2016-12-06  6:30     ` Juergen Gross
2016-12-06 11:25       ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).