lkml.org 
[lkml]   [2021]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 7/7] docs: proc.rst: stat: Note the interrupt counter wrap-around
From
Date
On 9/10/21 8:48 PM, Alexei Lozovsky wrote:
> Let's make wrap-around documented behavior so that userspace has no
> excuses for not handling it properly if they want accurate values.
>
> Both "intr" and "softirq" counters (as well as many others, actually)
> can and will wrap-around, given enough time since boot.
>
> Signed-off-by: Alexei Lozovsky <me@ilammy.net>
> ---
> Documentation/filesystems/proc.rst | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
> index 042c418f4090..06a0e3aa2e0e 100644
> --- a/Documentation/filesystems/proc.rst
> +++ b/Documentation/filesystems/proc.rst
> @@ -1513,6 +1513,13 @@ interrupts serviced including unnumbered architecture specific interrupts;
> each subsequent column is the total for that particular numbered interrupt.
> Unnumbered interrupts are not shown, only summed into the total.
>
> +.. note::
> +
> + Interrupt counters on most platforms are 32-bit, including the total count.
> + Depending on the system load, ths values will sooner or later wrap around.

these

> + If you want accurate accouting of the rate and *real* number of interrupts

accounting

> + serviced, you should monitor the value closely and handle wrap-arounds.
> +
> The "ctxt" line gives the total number of context switches across all CPUs.
>
> The "btime" line gives the time at which the system booted, in seconds since
>

thanks.
--
~Randy

\
 
 \ /
  Last update: 2021-09-11 06:01    [W:0.365 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site