[PATCH 0/8] tools/xenstored: add support for watch depth feature

Juergen Gross posted 8 patches 1 month, 1 week ago
Failed in applying to current master (apply log)
docs/man/xl.cfg.5.pod.in         |   6 ++
docs/misc/xenstore.txt           |  14 ++-
tools/include/xenstore.h         |  16 +++
tools/libs/store/libxenstore.map |   2 +
tools/libs/store/xs.c            | 116 ++++++++++++++++++----
tools/xenstored/core.c           |  15 ++-
tools/xenstored/domain.c         |  64 +++++++++---
tools/xenstored/domain.h         |   2 +
tools/xenstored/lu.c             |   3 +
tools/xenstored/transaction.c    |  14 +--
tools/xenstored/transaction.h    |   4 +-
tools/xenstored/watch.c          | 161 ++++++++++++++++++++++---------
tools/xenstored/watch.h          |  10 +-
xen/include/public/io/xs_wire.h  |   2 +
14 files changed, 328 insertions(+), 101 deletions(-)
[PATCH 0/8] tools/xenstored: add support for watch depth feature
Posted by Juergen Gross 1 month, 1 week ago
In order to reduce excessive number of watch events the watch depth
feature has been defined, allowing the user to limit the number of
node levels below the watched node to cause events.

This series is implementing this feature for xenstored (including the
PV and PVH stubdom variants).

Possible users are:

- xl/libxl: use domid information for the special @introduceDomain and
  @releaseDomain watches, which will be available when using depth = 1

- xenconsoled, like xl/libxl

- any PV-device backends watching directories for added devices (no
  watch events when any device specific node is modified)

- any PV-device frontend and backend watching the "state" node of the
  other side, in case the other side plays dirty games by building
  large sub-trees beneath the "state" node

This series has been tested with a modified xenstore-watch client.
The modification will be sent as soon as the pending series of the
xs-clients has been applied.

Note that the watch depth series depends on the still pending series
"tools: add support for per-domain xenstore quota".

Juergen Gross (8):
  tools/xenstored: allow domU to get own features
  docs: clarify Xenstore watch depth feature
  tools/libs/store: add support to use watches with a depth parameter
  tools/xenstored: add depth information to watches
  tools/xenstored: add depth handling to XS_WATCH
  tools/xenstored: replace the fire_watches() exact parameter
  tools/xenstored: expand special watch handling with depth feature
  tools/xenstored: make XENSTORE_SERVER_FEATURE_WATCHDEPTH available

 docs/man/xl.cfg.5.pod.in         |   6 ++
 docs/misc/xenstore.txt           |  14 ++-
 tools/include/xenstore.h         |  16 +++
 tools/libs/store/libxenstore.map |   2 +
 tools/libs/store/xs.c            | 116 ++++++++++++++++++----
 tools/xenstored/core.c           |  15 ++-
 tools/xenstored/domain.c         |  64 +++++++++---
 tools/xenstored/domain.h         |   2 +
 tools/xenstored/lu.c             |   3 +
 tools/xenstored/transaction.c    |  14 +--
 tools/xenstored/transaction.h    |   4 +-
 tools/xenstored/watch.c          | 161 ++++++++++++++++++++++---------
 tools/xenstored/watch.h          |  10 +-
 xen/include/public/io/xs_wire.h  |   2 +
 14 files changed, 328 insertions(+), 101 deletions(-)

-- 
2.53.0
Re: [PATCH 0/8] tools/xenstored: add support for watch depth feature
Posted by Juergen Gross 12 hours ago
Regarding the upcoming feature freeze, would it be possible to get some
feedback on this series?

I would really appreciate if at least the first 3 patches could make it
into 4.22, as this will avoid the need to bump the libxenstore minor
version in 4.23 again.


Juergen

On 13.03.26 08:47, Juergen Gross wrote:
> In order to reduce excessive number of watch events the watch depth
> feature has been defined, allowing the user to limit the number of
> node levels below the watched node to cause events.
> 
> This series is implementing this feature for xenstored (including the
> PV and PVH stubdom variants).
> 
> Possible users are:
> 
> - xl/libxl: use domid information for the special @introduceDomain and
>    @releaseDomain watches, which will be available when using depth = 1
> 
> - xenconsoled, like xl/libxl
> 
> - any PV-device backends watching directories for added devices (no
>    watch events when any device specific node is modified)
> 
> - any PV-device frontend and backend watching the "state" node of the
>    other side, in case the other side plays dirty games by building
>    large sub-trees beneath the "state" node
> 
> This series has been tested with a modified xenstore-watch client.
> The modification will be sent as soon as the pending series of the
> xs-clients has been applied.
> 
> Note that the watch depth series depends on the still pending series
> "tools: add support for per-domain xenstore quota".
> 
> Juergen Gross (8):
>    tools/xenstored: allow domU to get own features
>    docs: clarify Xenstore watch depth feature
>    tools/libs/store: add support to use watches with a depth parameter
>    tools/xenstored: add depth information to watches
>    tools/xenstored: add depth handling to XS_WATCH
>    tools/xenstored: replace the fire_watches() exact parameter
>    tools/xenstored: expand special watch handling with depth feature
>    tools/xenstored: make XENSTORE_SERVER_FEATURE_WATCHDEPTH available
> 
>   docs/man/xl.cfg.5.pod.in         |   6 ++
>   docs/misc/xenstore.txt           |  14 ++-
>   tools/include/xenstore.h         |  16 +++
>   tools/libs/store/libxenstore.map |   2 +
>   tools/libs/store/xs.c            | 116 ++++++++++++++++++----
>   tools/xenstored/core.c           |  15 ++-
>   tools/xenstored/domain.c         |  64 +++++++++---
>   tools/xenstored/domain.h         |   2 +
>   tools/xenstored/lu.c             |   3 +
>   tools/xenstored/transaction.c    |  14 +--
>   tools/xenstored/transaction.h    |   4 +-
>   tools/xenstored/watch.c          | 161 ++++++++++++++++++++++---------
>   tools/xenstored/watch.h          |  10 +-
>   xen/include/public/io/xs_wire.h  |   2 +
>   14 files changed, 328 insertions(+), 101 deletions(-)
>