From: Andrii Sultanov <andrii.sultanov@cloud.com>
To: xen-devel@lists.xenproject.org
Cc: Andrii Sultanov <andrii.sultanov@cloud.com>,
Christian Lindig <christian.lindig@citrix.com>,
David Scott <dave@recoil.org>,
Anthony PERARD <anthony.perard@vates.tech>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>
Subject: [PATCH v2 0/3] tools/ocaml: Stabilize domain_getinfo for Oxenstored
Date: Tue, 3 Sep 2024 12:44:41 +0100 [thread overview]
Message-ID: <cover.1725363427.git.andrii.sultanov@cloud.com> (raw)
This is a V2 of the "Stabilize Oxenstored's interface with" patch
series, see V1's cover letter for the motivation of these changes.
Two patches from V1 ("tools/ocaml: Fix OCaml libs rules" and
"Remove '-cc $(CC)' from OCAMLOPTFLAGS") were commited upstream, so
they've been dropped from here.
V2 addresses the following review comments and suggestions:
* Split the plugin implementation commit into two - build
infrastructure-related and implementation itself.
* Package xenstored_glue interface, since it's needed for an
out-of-tree oxenstored to build. Additionally package xenstored_glue_dev
with .ml and .mli files.
* Clean up unnecessary #define, #include, and fix function parameter
types as suggested.
* Improve error handling in xsglue_failwith_xc, additionally version
xsg.error to avoid potential future conflicts.
* Drop the GC lock around xc_domain_getinfo_single, and move Int_val
outside of the blocking_section.
* Use existing logging facilities in oxenstored
* Plugin now uses logging function provided by the plugin interface
(ignoring input by default)
* domain_getinfolist gets all 32k domains at once instead of listing them
in chunks, storing information into an array. OCaml interface was simplified
appropriately. (Cxenstored does not do this at the moment - as far as I
understand, it also uses the single-domain version of the function).
I've decided against introducing an enum for the shutdown code, as it adds
additional complexity (and potential reasons for creating a new plugin version)
without any benefit - oxenstored does not care about its value at the moment.
Patch series on Gitlab for ease of review:
https://gitlab.com/xen-project/people/asultanov/xen/-/compare/staging...plugin-v3
V2 passed the Gitlab CI: https://gitlab.com/xen-project/people/asultanov/xen/-/pipelines/1437391764
It was also tested on some hosts.
Andrii Sultanov (3):
tools/ocaml: Build infrastructure for OCaml dynamic libraries
ocaml/libs: Implement a dynamically-loaded plugin for
Xenctrl.domain_getinfo
tools/oxenstored: Use the plugin for Xenctrl.domain_getinfo
Config.mk | 2 +-
configure | 7 +
m4/paths.m4 | 4 +
tools/configure | 7 +
tools/ocaml/Makefile | 1 +
tools/ocaml/Makefile.rules | 17 +-
tools/ocaml/libs/Makefile | 2 +-
tools/ocaml/libs/xenstoredglue/META.in | 4 +
tools/ocaml/libs/xenstoredglue/Makefile | 46 +++++
.../domain_getinfo_plugin_v1/META.in | 5 +
.../domain_getinfo_plugin_v1/Makefile | 38 ++++
.../domain_getinfo_stubs_v1.c | 172 ++++++++++++++++++
.../domain_getinfo_v1.ml | 36 ++++
.../domain_getinfo_v1.mli | 0
.../libs/xenstoredglue/plugin_interface_v1.ml | 28 +++
.../xenstoredglue/plugin_interface_v1.mli | 36 ++++
tools/ocaml/xenstored/Makefile | 5 +-
tools/ocaml/xenstored/domains.ml | 63 +++++--
tools/ocaml/xenstored/paths.ml.in | 1 +
19 files changed, 451 insertions(+), 23 deletions(-)
create mode 100644 tools/ocaml/libs/xenstoredglue/META.in
create mode 100644 tools/ocaml/libs/xenstoredglue/Makefile
create mode 100644 tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/META.in
create mode 100644 tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/Makefile
create mode 100644 tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/domain_getinfo_stubs_v1.c
create mode 100644 tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/domain_getinfo_v1.ml
create mode 100644 tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/domain_getinfo_v1.mli
create mode 100644 tools/ocaml/libs/xenstoredglue/plugin_interface_v1.ml
create mode 100644 tools/ocaml/libs/xenstoredglue/plugin_interface_v1.mli
--
2.39.2
next reply other threads:[~2024-09-03 11:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 11:44 Andrii Sultanov [this message]
2024-09-03 11:44 ` [PATCH v2 1/3] tools/ocaml: Build infrastructure for OCaml dynamic libraries Andrii Sultanov
2024-09-03 16:40 ` Andrew Cooper
2024-09-04 8:27 ` Christian Lindig
2024-09-03 11:44 ` [PATCH v2 2/3] ocaml/libs: Implement a dynamically-loaded plugin for Xenctrl.domain_getinfo Andrii Sultanov
2024-09-06 13:38 ` Andrew Cooper
2024-09-06 14:20 ` Andrii Sultanov
2024-09-06 14:31 ` Andrew Cooper
2024-09-06 14:23 ` Andrew Cooper
2024-09-03 11:44 ` [PATCH v2 3/3] tools/oxenstored: Use the " Andrii Sultanov
2024-09-06 14:30 ` Andrew Cooper
2024-09-06 12:02 ` [PATCH v2 0/3] tools/ocaml: Stabilize domain_getinfo for Oxenstored Christian Lindig
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=cover.1725363427.git.andrii.sultanov@cloud.com \
--to=andrii.sultanov@cloud.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=christian.lindig@citrix.com \
--cc=dave@recoil.org \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.