From: Crystal Wood <crwood@redhat.com>
To: Rafael Folco <rfolco@redhat.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: williams@redhat.com, jkacur@redhat.com, linux-rt-users@vger.kernel.org
Subject: Re: [PATCH] Change min/max to float numbers
Date: Fri, 07 Feb 2025 17:23:58 -0600 [thread overview]
Message-ID: <4bcef79ddfd9e149cd6434a038a265060a320e9d.camel@redhat.com> (raw)
In-Reply-To: <37c7e3c7-d9fe-4e8a-9b5d-61d041a9151a@redhat.com>
On Fri, 2025-02-07 at 11:20 -0300, Rafael Folco wrote:
> On 06/02/25 18:23, Crystal Wood wrote:
> > On Thu, 2025-02-06 at 12:02 -0300, Rafael Folco wrote:
> > > On 06/02/25 09:00, Sebastian Andrzej Siewior wrote:
> > > > On 2025-02-06 06:16:22 [-0300], Rafael Folco wrote:
> > > > > Make min/max consistent with avg by recording the latency samples
> > > > > as float numbers instead of integers.
> > > >
> > > > Why?
> > >
> > > - More precise numbers of Max/Min for extreme low latency cases
> > > - Distinguish zero latency in bucket 001 (us)
> > > - Distinguish values from upper/lower boundaries in a bucket
> > > - Clarify confusion on average (round up) vs maximum in the next bucket (casting)
> >
> > If you want more precision, set --bucket-width to something lower than
> > 1000 ns. That will cause everything to be reported with ns precision
> > (though maybe not quite ns accuracy, depending on the hardware). We
> > were hesitant to make ns precision the default in case it misleads
> > people about the accuracy (plus I didn't know if the change might
> > confuse some tools that consume the output).
> Yes, it works for precision. Average is higher than max with default bucket width, though.
This is due to the average being calculated from the histogram (rounding
to the top of the bucket), while min/max is the direct value. Maybe we
should keep a running total to compute average from?
We may also want to think about whether we should unconditionally use
ns.
-Crystal
prev parent reply other threads:[~2025-02-07 23:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 9:16 [PATCH] Change min/max to float numbers Rafael Folco
2025-02-06 12:00 ` Sebastian Andrzej Siewior
2025-02-06 15:02 ` Rafael Folco
2025-02-06 15:09 ` Sebastian Andrzej Siewior
2025-02-06 15:24 ` Rafael Folco
2025-02-06 15:36 ` Sebastian Andrzej Siewior
2025-02-06 16:22 ` Rafael Folco
2025-02-06 21:23 ` Crystal Wood
2025-02-07 14:20 ` Rafael Folco
2025-02-07 23:23 ` Crystal Wood [this message]
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=4bcef79ddfd9e149cd6434a038a265060a320e9d.camel@redhat.com \
--to=crwood@redhat.com \
--cc=bigeasy@linutronix.de \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=rfolco@redhat.com \
--cc=williams@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).