On Tue, Jun 15, 2021 at 09:06:43AM +0200, Paolo Bonzini wrote: > On 15/06/21 07:25, Leon Romanovsky wrote: > > Sorry for my naive questions, but how does telemetry get statistics > > for hypervisors? Why is KVM different from hypervisors or NIC's statistics > > or any other high speed devices (RDMA) that generate tons of data? > > Right now, the only way is debugfs but it's slow, and it's disabled when > using lockdown mode; this series is a way to fix this. > > I sense that there is another question in there; are you wondering if > another mechanism should be used, for example netlink? The main issue there > is how to identify a VM, since KVM file descriptors don't have a name. > Using a pid works (sort of) for debugfs, but pids are not appropriate for a > stable API. Using a file descriptor as in this series requires > collaboration from the userspace program; howver, once the file descriptor > has been transmitted via SCM_RIGHTS, telemetry can read it forever without > further IPC, and there is proper privilege separation. Yeah, sorry for mixing different questions into one. So the answer to the question "why KVM is different" is that it doesn't have any stable identification except file descriptor. While hypervisors have stable names, NICs and RDMA devices have interface indexes e.t.c. Did I get it right? And this was second part of my question, the first part was my attempt to get on answer why current statistics like process info (/proc/xxx/*), NICs (netlink) and RDMA (sysfs) are not using binary format. Thanks > > Paolo >