From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91043C49EAB for ; Tue, 15 Jun 2021 13:34:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7339461477 for ; Tue, 15 Jun 2021 13:34:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231424AbhFONgn (ORCPT ); Tue, 15 Jun 2021 09:36:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:54082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230410AbhFONgT (ORCPT ); Tue, 15 Jun 2021 09:36:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AF8716146D; Tue, 15 Jun 2021 13:34:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623764049; bh=REF7Zyu6cbgt3VHjuTrKDBWw8/fKKSkHr0brWCx1WDY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tkUy3EPUFEC5VTgPlUyI6q6kNVNwNuv+cujwgXgPktfMgwoXCN95LVYvlr2Cxj5lz l7GoBU3O5grP+tSvw2b+HZzeV4cPkqgacG9kci2/x8y4ZXP/qpEimP9hJZ0eyIvDWb e5t98f1pDJrHOs1eMmm+HNMbbYx0y9UmuOFThQFo+VSYEuyk0VmOVUs27m7Z1XOQ8N OzmOPwdzQMYJWZIAF/rw5OQU4jmobLkJjH62eDzX9vHVkkrAFKFk73DgtornGy6rzc Q89kw18R9QHxO9McqK/4MPLseixa1r/dEtCbz2OYQIwQJI29SS6qjzYQ0ZfHpVymek F4bBAvgv4qHbg== Date: Tue, 15 Jun 2021 16:34:05 +0300 From: Leon Romanovsky To: Paolo Bonzini Cc: Jing Zhang , KVM , KVMARM , LinuxMIPS , KVMPPC , LinuxS390 , Linuxkselftest , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon , Huacai Chen , Aleksandar Markovic , Thomas Bogendoerfer , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Peter Shier , Oliver Upton , David Rientjes , Emanuele Giuseppe Esposito , David Matlack , Ricardo Koller , Krish Sadhukhan , Fuad Tabba Subject: Re: [PATCH v9 0/5] KVM statistics data fd-based binary interface Message-ID: References: <20210614212155.1670777-1-jingzhangos@google.com> <15875c41-e1e7-3bf2-a85c-21384684d279@redhat.com> <9df462c0-e0ea-8173-0705-369d6a81107c@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9df462c0-e0ea-8173-0705-369d6a81107c@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Tue, Jun 15, 2021 at 01:03:34PM +0200, Paolo Bonzini wrote: > On 15/06/21 09:53, 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? > > > > 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 etc. > > Did I get it right? > > 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. > > NICs are using binary format (partly in struct ethtool_stats, partly in an > array of u64). For KVM we decided to put the schema and the stats in the > same file (though you can use pread to get only the stats) to have a single > interface and avoid ioctls, unlike having both ETH_GSTRINGS and ETH_GSTATS. > > I wouldn't say processes are using any specific format. There's a mix of > "one value per file" (e.g. cpuset), human-readable tabular format (e.g. > limits, sched), human- and machine-readable tabular format (e.g. status), > and files that are ASCII but not human-readable (e.g. stat). I see, your explanation to Enrico cleared the mud. Thanks > > Paolo >