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

Juergen Gross posted 9 patches 1 week, 5 days ago
Failed in applying to current master (apply log)
docs/man/xenstore-watch.1.pod      |   9 ++
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              | 102 +++++++++++++++---
tools/xenstored/core.c             |  15 ++-
tools/xenstored/domain.c           |  61 ++++++++---
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 +-
tools/xs-clients/xenstore_client.c |  19 +++-
xen/include/public/io/xs_wire.h    |   2 +
16 files changed, 343 insertions(+), 97 deletions(-)
[PATCH v2 0/9] tools/xenstored: add support for watch depth feature
Posted by Juergen Gross 1 week, 5 days 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

Changes in V2:
- some minor stale changes reverted
- last patch covered by the series now, man page updated

Juergen Gross (9):
  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
  tools/xs-clients: support depth with xenstore-watch

 docs/man/xenstore-watch.1.pod      |   9 ++
 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              | 102 +++++++++++++++---
 tools/xenstored/core.c             |  15 ++-
 tools/xenstored/domain.c           |  61 ++++++++---
 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 +-
 tools/xs-clients/xenstore_client.c |  19 +++-
 xen/include/public/io/xs_wire.h    |   2 +
 16 files changed, 343 insertions(+), 97 deletions(-)

-- 
2.53.0
Re: [PATCH v2 0/9] tools/xenstored: add support for watch depth feature
Posted by Jan Beulich 1 week, 5 days ago
On 21.04.2026 09:42, 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
> 
> Changes in V2:
> - some minor stale changes reverted
> - last patch covered by the series now, man page updated

Is this really everything that changed? I wanted to commit the first two
patches from v1, but I had to leave out patch 1 as it didn't apply. Patch
2 I have in pre-push testing already, but as mentioned on Matrix there's
a so far unexplained build issue (definitely not related to this series,
though).

Jan
Re: [PATCH v2 0/9] tools/xenstored: add support for watch depth feature
Posted by Jürgen Groß 1 week, 5 days ago
On 21.04.26 09:55, Jan Beulich wrote:
> On 21.04.2026 09:42, 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
>>
>> Changes in V2:
>> - some minor stale changes reverted
>> - last patch covered by the series now, man page updated
> 
> Is this really everything that changed? I wanted to commit the first two
> patches from v1, but I had to leave out patch 1 as it didn't apply. Patch

Ah, there was change in the patch context due to the per-domain quota series:
a literal atoi() was replaced by a parse_domid().


Juergen