From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xen.org
Cc: Juergen Gross <jgross@suse.com>,
sstabellini@kernel.org, wei.liu2@citrix.com,
George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com
Subject: [PATCH v3 00/12] xenstore: support reading directory with many children
Date: Fri, 11 Nov 2016 08:59:58 +0100 [thread overview]
Message-ID: <1478851210-6251-1-git-send-email-jgross@suse.com> (raw)
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 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 | 24 +-
tools/xenstore/xenstore_client.c | 117 +++++
tools/xenstore/xenstored_core.c | 799 ++++++++++++++++++---------------
tools/xenstore/xenstored_core.h | 23 +-
tools/xenstore/xenstored_domain.c | 218 ++++-----
tools/xenstore/xenstored_domain.h | 14 +-
tools/xenstore/xenstored_transaction.c | 100 +++--
tools/xenstore/xenstored_transaction.h | 8 +-
tools/xenstore/xenstored_watch.c | 89 ++--
tools/xenstore/xenstored_watch.h | 6 +-
tools/xenstore/xs.c | 80 +++-
tools/xenstore/xs_lib.c | 112 -----
tools/xenstore/xs_tdb_dump.c | 11 +-
xen/include/public/io/xs_wire.h | 3 +
14 files changed, 872 insertions(+), 732 deletions(-)
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2016-11-11 7:59 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 7:59 Juergen Gross [this message]
2016-11-11 7:59 ` [PATCH v3 01/12] xenstore: modify add_change_node() parameter types Juergen Gross
2016-11-12 15:09 ` Wei Liu
2016-11-11 8:00 ` [PATCH v3 02/12] xenstore: call add_change_node() directly when writing node Juergen Gross
2016-11-12 15:10 ` Wei Liu
2016-11-13 10:50 ` Juergen Gross
2016-11-14 8:46 ` Wei Liu
2016-11-11 8:00 ` [PATCH v3 03/12] xenstore: use common tdb record header in xenstore Juergen Gross
2016-11-12 15:10 ` Wei Liu
2016-11-11 8:00 ` [PATCH v3 04/12] xenstore: add per-node generation counter Juergen Gross
2016-11-12 15:10 ` Wei Liu
2016-11-11 8:00 ` [PATCH v3 05/12] xenstore: add support for reading directory with many children Juergen Gross
2016-11-11 10:09 ` Jan Beulich
[not found] ` <5825A6D6020000780011DEA4@suse.com>
2016-11-11 10:43 ` Juergen Gross
2016-11-11 11:12 ` Jan Beulich
[not found] ` <5825B59B020000780011DF28@suse.com>
2016-11-11 11:15 ` Juergen Gross
2016-11-12 15:11 ` Wei Liu
2016-11-11 8:00 ` [PATCH v3 06/12] xenstore: support XS_DIRECTORY_PART in libxenstore Juergen Gross
2016-11-12 15:11 ` Wei Liu
2016-11-11 8:00 ` [PATCH v3 07/12] xenstore: use array for xenstore wire command handling Juergen Gross
2016-11-12 15:11 ` Wei Liu
2016-11-11 8:00 ` [PATCH v3 08/12] xenstore: let command functions return error or success Juergen Gross
2016-11-12 15:11 ` Wei Liu
2016-11-13 11:05 ` Juergen Gross
2016-11-11 8:00 ` [PATCH v3 09/12] xenstore: make functions static Juergen Gross
2016-11-11 13:02 ` Andrew Cooper
2016-11-11 13:19 ` Juergen Gross
2016-11-11 8:00 ` [PATCH v3 10/12] xenstore: add helper functions for wire argument parsing Juergen Gross
2016-11-12 15:11 ` Wei Liu
2016-11-11 8:00 ` [PATCH v3 11/12] xenstore: add small default data buffer to internal struct Juergen Gross
2016-11-12 15:11 ` Wei Liu
2016-11-11 8:00 ` [PATCH v3 12/12] xenstore: handle memory allocation failures in xenstored Juergen Gross
2016-11-11 11:07 ` Juergen Gross
2016-11-12 15:11 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478851210-6251-1-git-send-email-jgross@suse.com \
--to=jgross@suse.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).