mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: Christoph Lameter <cl@linux.com>
Cc: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Subject: Re: Why do we still have 32 bit counters? Interrupt counters overflow within 50 days
Date: Fri, 03 Oct 2014 14:15:12 +0200	[thread overview]
Message-ID: <1412338512.19413.85.camel@x220> (raw)
In-Reply-To: <alpine.DEB.2.11.1410030653040.8496@gentwo.org>

On Fri, 2014-10-03 at 06:54 -0500, Christoph Lameter wrote:
> On Fri, 3 Oct 2014, Thomas Gleixner wrote:
> 
> > > Is this the way its intended or should the counters be expanded to 64 bit?
> >
> > There is no reason why we cannot or should not expand them.
> 
> Ok here is a patch to do just that:
> 
> 
> Subject: Increase irq counters to 64 bit
> 
> 
> Irq counters can overflow easily if they are just 32 bit.
> 
> For example the timer interrupt occurs 1000 times per second, so
> it is predictable that the timer interrupt will overflow in
> 
> 
> 2^ 32 / 1000 [interrupts per second] / 86400 [seconds in a day]
> 
> which results in 46 days.

dc -e "1 k 2 32 ^ 1000 / 86400 / p"
49.7

(That was the number I remembered from stories about a ancient Windows
lockup.)

> Other irq counters for devices may wrap even faster for example
> those for high speed networking devices.
> 
> This patch is needed to avoid the counter overflow by increasing
> the counters to 64 bit.
> 
> Signed-off-by: Christoph Lameter <cl@linux.com>


Paul Bolle



  parent reply	other threads:[~2014-10-03 12:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03  9:45 Christoph Lameter
2014-10-03 10:33 ` Thomas Gleixner
2014-10-03 11:54   ` Christoph Lameter
2014-10-03 12:03     ` Richard Cochran
2014-10-03 12:07       ` Christoph Lameter
2014-10-03 12:17         ` Richard Cochran
2014-10-03 14:04           ` Christoph Lameter
2014-10-05 21:49         ` Thomas Gleixner
2014-10-05 23:24           ` Christoph Lameter
2014-10-05 23:57             ` Eric Dumazet
2014-10-06  8:06             ` Thomas Gleixner
2014-10-06 10:22               ` Christoph Lameter
2014-10-06 13:01                 ` Thomas Gleixner
2014-10-06 15:16                   ` Christoph Lameter
2014-10-06 15:28                     ` Thomas Gleixner
2014-10-06 19:34                       ` Henrique de Moraes Holschuh
2014-10-06 15:31                     ` David Lang
2014-10-06 19:45                       ` Christoph Lameter
2014-10-05 23:59           ` Eric Dumazet
2014-10-06  7:54             ` Thomas Gleixner
2014-10-06 10:49           ` David Lang
2014-10-06 12:28             ` Thomas Gleixner
2014-10-03 12:15     ` Paul Bolle [this message]
2014-10-03 12:23       ` Christoph Lameter
2014-10-04 10:26         ` Bernd Petrovitsch

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=1412338512.19413.85.camel@x220 \
    --to=pebolle@tiscali.nl \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®