public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* interrupt count (/proc/stat) change in 2.4.19-pre9
@ 2002-05-30  4:04 Todd R. Eigenschink
  2002-05-30  4:17 ` Benjamin LaHaise
  0 siblings, 1 reply; 2+ messages in thread
From: Todd R. Eigenschink @ 2002-05-30  4:04 UTC (permalink / raw)
  To: linux-kernel

What's the purpose of this patchlet (below) in 2.4.19-pre9?  Interrupt
counts that would otherwise be zero are, of course, a billion larger
than they should be.

Is it trying to induce some sort of intentional overflow in the
interrupt count, or is there some other big-picture change that
requires this?  I see the comment from the BK changeset, but I still
don't understand the purpose.

    http://linux.bkbits.net:8080/linux-2.4/cset@1.445.1.6



@@ -299,10 +321,11 @@

 #if !defined(CONFIG_ARCH_S390)
        for (i = 0 ; i < NR_IRQS ; i++)
-               len += sprintf(page + len, " %u", kstat_irqs(i));
+               proc_sprintf(page, &off, &len,
+                            " %u", kstat_irqs(i) + 1000000000);
 #endif



rtfm 22:53:54 eigenstr > cat /proc/stat 
cpu  348158 0 266880 7305274
cpu0 348158 0 266880 7305274
page 2537925 2677355
swap 16803 25944
intr 16414147 1007920312 1000106007 1000000000 1001336824 1000000003 1000000633 1000000003 1000000035 1006470428 1000000008 1000000004 1000000003 1000176343 1000000000 1000403540 1000000004 1000000000 blah blah blah



Todd


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: interrupt count (/proc/stat) change in 2.4.19-pre9
  2002-05-30  4:04 interrupt count (/proc/stat) change in 2.4.19-pre9 Todd R. Eigenschink
@ 2002-05-30  4:17 ` Benjamin LaHaise
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin LaHaise @ 2002-05-30  4:17 UTC (permalink / raw)
  To: Todd R. Eigenschink; +Cc: linux-kernel

On Wed, May 29, 2002 at 11:04:13PM -0500, Todd R. Eigenschink wrote:
> Is it trying to induce some sort of intentional overflow in the
> interrupt count, or is there some other big-picture change that
> requires this?  I see the comment from the BK changeset, but I still
> don't understand the purpose.

It's a brown paper bag.  By making the counts 9 digits long, the bug in 
the old code that the patch fixed was triggered.

		-ben

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-30  4:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-30  4:04 interrupt count (/proc/stat) change in 2.4.19-pre9 Todd R. Eigenschink
2002-05-30  4:17 ` Benjamin LaHaise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox