From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: KVM list <kvm@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Alex Williamson <alex.williamson@redhat.com>,
Peter Feiner <pfeiner@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: "statsfs" API design
Date: Tue, 26 Nov 2019 15:18:30 +0100 [thread overview]
Message-ID: <20191126141830.GA1446708@kroah.com> (raw)
In-Reply-To: <75dc4403-cc07-0f99-00ec-86f61092fff9@redhat.com>
On Tue, Nov 26, 2019 at 11:50:29AM +0100, Paolo Bonzini wrote:
> On 26/11/19 11:09, Greg Kroah-Hartman wrote:
> > So I think there are two different things here:
> > - a simple data structure for in-kernel users of statistics
> > - a way to export statistics to userspace
> >
> > Now if they both can be solved with the same "solution", wonderful! But
> > don't think that you have to do both of these at the same time.
> >
> > Which one are you trying to solve here, I can't figure it out. Is it
> > the second one?
>
> I already have the second in KVM using debugfs, but that's not good. So
> I want to do:
>
> - a simple data structure for in-kernel *publishers* of statistics
>
> - a sysfs-based interface to export it to userspace, which looks a lot
> like KVM's debugfs-based statistics.
>
> What we don't have to do at the same time, is a new interface to
> userspace, one that is more efficient while keeping the self-describing
> property that we agree is needed. That is also planned, but would come
> later.
Ok, I have no objection to tying these to sysfs entries for now, but we
should be careful in how you handle the sysfs hierarchy to not make it
too complex or difficult to parse from userspace (lots of little files
does not make gathering stats easy as was already pointed out.)
for in-kernel stats, here's a note that I had that I finally found from
a different kernel developer saying what they wanted to see in something
like this:
(Accurate) statistics counters need RMW ops, don't need memory
ordering, usually can't be locked against writes, and may not
care about wrapping.
thanks,
greg k-h
next prev parent reply other threads:[~2019-11-26 14:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 15:56 "statsfs" API design Paolo Bonzini
2019-11-09 15:49 ` Greg Kroah-Hartman
2019-11-10 13:04 ` Paolo Bonzini
2019-11-26 10:09 ` Greg Kroah-Hartman
2019-11-26 10:50 ` Paolo Bonzini
2019-11-26 14:18 ` Greg Kroah-Hartman [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-11-09 18:44 Alexey Dobriyan
2019-11-10 9:14 ` Greg KH
2019-11-10 10:09 ` Brian Masney
2019-11-10 10:14 ` Greg KH
2019-11-10 10:19 ` Greg KH
2019-11-10 15:34 ` Alexey Dobriyan
2019-11-10 20:58 ` Paolo Bonzini
2019-11-11 20:40 ` Alexey Dobriyan
2019-11-26 10:07 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191126141830.GA1446708@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alex.williamson@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=pfeiner@google.com \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox