linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] disable per cpu intr in /proc/stat
@ 2006-01-22 20:22 Olaf Hering
  2006-01-22 20:31 ` Andrew Morton
  2006-01-22 20:38 ` Jesper Juhl
  0 siblings, 2 replies; 5+ messages in thread
From: Olaf Hering @ 2006-01-22 20:22 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel

(No bugzilla or benchmark)

From: schwab@suse.de
Subject: Reading /proc/stat is slooow

Don't compute and display the per-irq sums on ia64 either, too much
overhead for mostly useless figures.

--- linux-2.6.14/fs/proc/proc_misc.c.~1~	2005-12-06 18:12:28.840059961 +0100
+++ linux-2.6.14/fs/proc/proc_misc.c	2005-12-06 18:13:51.211896515 +0100
@@ -498,7 +498,7 @@ static int show_stat(struct seq_file *p,
 	}
 	seq_printf(p, "intr %llu", (unsigned long long)sum);
 
-#if !defined(CONFIG_PPC64) && !defined(CONFIG_ALPHA)
+#if !defined(CONFIG_PPC64) && !defined(CONFIG_ALPHA) && !defined(CONFIG_IA64)
 	for (i = 0; i < NR_IRQS; i++)
 		seq_printf(p, " %u", kstat_irqs(i));
 #endif
-- 
short story of a lazy sysadmin:
 alias appserv=wotan

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [PATCH] disable per cpu intr in /proc/stat
@ 2006-01-23  0:02 Albert Cahalan
  0 siblings, 0 replies; 5+ messages in thread
From: Albert Cahalan @ 2006-01-23  0:02 UTC (permalink / raw)
  To: akpm, linux-kernel, olh

While ripping this out may break things, leaving it in has
been breaking things as well. That line just keeps growing.
Many times, I have found that my buffer was too small to
read that file. (shall I make it a megabyte or what?)

Looking around a bit, I can only find use of the first number.
(so don't remove that)

I suggest removing the excess values for all architectures.
It's in /proc/interrupts anyway.

If some architectures will keep the data, then please limit
the data to the original 16 PC-AT interrupts and #if it like so:

#if defined(CONFIG_X86) && defined(CONFIG_ISA)
        for (i = 0; i < 16; i++)  /* only the 16 legacy ones */
                seq_printf(p, " %u", kstat_irqs(i));
#endif

Those 16 are the only ones you can hope to identify
without looking in /proc/interrupts anyway.

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

end of thread, other threads:[~2006-01-23  0:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-22 20:22 [PATCH] disable per cpu intr in /proc/stat Olaf Hering
2006-01-22 20:31 ` Andrew Morton
2006-01-22 20:59   ` Tony Luck
2006-01-22 20:38 ` Jesper Juhl
2006-01-23  0:02 Albert Cahalan

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).