interrupt count (/proc/stat) change in 2.4.19-pre9
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/[email protected]
@@ -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
Quoted 4 lines · Todd R. Eigenschink
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