mbox series

[v9,0/4] improve telemetry support with in-memory mode

Message ID 20211014104907.856490-1-bruce.richardson@intel.com (mailing list archive)
Headers show
Series improve telemetry support with in-memory mode | expand

Message

Bruce Richardson Oct. 14, 2021, 10:49 a.m. UTC
This patchset cleans up telemetry support for "in-memory" mode, so that
multiple independent processes can be run using that mode and still have
telemetry support. It also removes problems of one process removing the
socket of another - which was the original issue reported. The main changes
in this set are to:

* disable telemetry for secondary processes, which prevents any socket
  conflicts in multi-process cases.
* when multiple processes are run using the same runtime directory (i.e.
  "in-memory" mode or similar), add a counter suffix to the socket names to
  avoid conflicts over the socket. Each process will use the lowest available
  suffix, with the first process using the directory, not adding any suffix.
* update the telemetry script and documentation to allow it to connect to
  in-memory DPDK processes.

---
V9: sort output lines in help text in script

V8: Merged patches 2 & 3 of the set together. Fixed some checkpatch warnings
flagged by the CI.

V7: Change from adding a pid suffix generally in "in-memory" mode, to adding an
increasing counter as a suffix in case of name conflicts generally. This
achieves the same result in terms of connectivity, but keeps compatibility of
behaviour for the case of a single in-memory process, while also providing
predictable more socket names for each process i.e. 4 running in-memory
instances they will always use suffixes 1-3 for the extra 3 sockets, even across
restarts.

V6: fixed issue whereby the failing of the legacy telemetry init would roll-back
init of the v2 telemetry, causing the socket to be deleted, even though it was
still necessary.

V5: Rebase on latest main after other script cleanups were merged

V4: Move from simple-fix patch to proper fix patchset

V3: Drop CC stable, as will have separate backport patch which does not
error out, so avoiding causing problems with currently running application

V2: fix build error on FreeBSD

Bruce Richardson (4):
  eal: limit telemetry to primary processes
  telemetry: fix socket path conflicts for in-memory mode
  usertools/dpdk-telemetry: connect to separate instances
  usertools/dpdk-telemetry: provide info on available sockets

 doc/guides/howto/telemetry.rst | 41 +++++++++++++++++++++
 lib/eal/freebsd/eal.c          |  2 +-
 lib/eal/linux/eal.c            |  2 +-
 lib/telemetry/telemetry.c      | 65 +++++++++++++++++++++++++---------
 usertools/dpdk-telemetry.py    | 45 ++++++++++++++++++++---
 5 files changed, 133 insertions(+), 22 deletions(-)

--
2.30.2

Comments

David Marchand Oct. 14, 2021, 7 p.m. UTC | #1
On Thu, Oct 14, 2021 at 12:50 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> This patchset cleans up telemetry support for "in-memory" mode, so that
> multiple independent processes can be run using that mode and still have
> telemetry support. It also removes problems of one process removing the
> socket of another - which was the original issue reported. The main changes
> in this set are to:
>
> * disable telemetry for secondary processes, which prevents any socket
>   conflicts in multi-process cases.
> * when multiple processes are run using the same runtime directory (i.e.
>   "in-memory" mode or similar), add a counter suffix to the socket names to
>   avoid conflicts over the socket. Each process will use the lowest available
>   suffix, with the first process using the directory, not adding any suffix.
> * update the telemetry script and documentation to allow it to connect to
>   in-memory DPDK processes.
>

Thanks a lot for working on this.
Reading the updated doc, I fixed some -file-prefix to --file-prefix in doc.

Series applied, thanks.
Bruce Richardson Oct. 15, 2021, 8:18 a.m. UTC | #2
On Thu, Oct 14, 2021 at 09:00:09PM +0200, David Marchand wrote:
> On Thu, Oct 14, 2021 at 12:50 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > This patchset cleans up telemetry support for "in-memory" mode, so that
> > multiple independent processes can be run using that mode and still have
> > telemetry support. It also removes problems of one process removing the
> > socket of another - which was the original issue reported. The main changes
> > in this set are to:
> >
> > * disable telemetry for secondary processes, which prevents any socket
> >   conflicts in multi-process cases.
> > * when multiple processes are run using the same runtime directory (i.e.
> >   "in-memory" mode or similar), add a counter suffix to the socket names to
> >   avoid conflicts over the socket. Each process will use the lowest available
> >   suffix, with the first process using the directory, not adding any suffix.
> > * update the telemetry script and documentation to allow it to connect to
> >   in-memory DPDK processes.
> >
> 
> Thanks a lot for working on this.
> Reading the updated doc, I fixed some -file-prefix to --file-prefix in doc.
> 
Thanks for the fixups.