From: David Reaver <me@davidreaver.com>
To: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
Randy Dunlap <rdunlap@infradead.org>,
Jens Axboe <axboe@kernel.dk>,
linux-doc@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] docs: iostats: Rewrite intro, remove outdated formats
Date: Fri, 14 Feb 2025 09:39:11 -0800 [thread overview]
Message-ID: <864j0wxw74.fsf@davidreaver.com> (raw)
In-Reply-To: <CALYGNiOU3vPAyvsNv4rt=qZRbZFVZ9iAe+kzPzGKkx6_L3wG5Q@mail.gmail.com> (Konstantin Khlebnikov's message of "Fri, 14 Feb 2025 18:00:21 +0100")
Konstantin Khlebnikov <koct9i@gmail.com> writes:
> Wraparounds here are slightly more complicated than simply 32-bit or 64-bit overflows.
>
> Internal time counters are 64-bit in nanoseconds.
>
> Values are converted into milliseconds for printing,
> also 32-bit architectures truncate printed values to 32-bit.
>
> So the common trick: delta = (long)(after - before) does not work,
> because the time counter wraps around UINT64_MAX/1000.
>
Thanks Konstantin. What do you think about just removing this entire
sentence? It is mostly tweaked from the old text that was rewritten, but
I'm not sure it is particularly insightful. That paragraph would look
like this:
All fields are cumulative, monotonic counters that start at zero at
boot, except for field 9, which resets to zero as I/Os complete. Other
fields only increase unless they overflow and wrap. Wrapping may occur
on long-running or high-load systems, so applications should handle this
properly.
Thanks,
David Reaver
next prev parent reply other threads:[~2025-02-14 17:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 1:39 [PATCH] docs: iostats: Update introduction with flush fields David Reaver
2025-02-14 2:21 ` Randy Dunlap
2025-02-14 5:14 ` [PATCH] docs: iostats: Rewrite intro, remove outdated formats David Reaver
2025-02-14 10:21 ` Bagas Sanjaya
2025-02-14 15:48 ` Jonathan Corbet
2025-02-14 15:56 ` David Reaver
[not found] ` <CALYGNiOU3vPAyvsNv4rt=qZRbZFVZ9iAe+kzPzGKkx6_L3wG5Q@mail.gmail.com>
2025-02-14 17:39 ` David Reaver [this message]
2025-02-15 17:18 ` Konstantin Khlebnikov
2025-02-15 17:29 ` David Reaver
2025-02-15 17:46 ` Konstantin Khlebnikov
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=864j0wxw74.fsf@davidreaver.com \
--to=me@davidreaver.com \
--cc=axboe@kernel.dk \
--cc=corbet@lwn.net \
--cc=koct9i@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.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;
as well as URLs for NNTP newsgroup(s).