linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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

* Re: [PATCH] disable per cpu intr in /proc/stat
  2006-01-22 20:31 ` Andrew Morton
@ 2006-01-22 20:59   ` Tony Luck
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Luck @ 2006-01-22 20:59 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Olaf Hering, linux-kernel, linux-ia64

On 1/22/06, Andrew Morton <akpm@osdl.org> wrote:
> Olaf Hering <olh@suse.de> wrote:
> > Don't compute and display the per-irq sums on ia64 either, too much
> > overhead for mostly useless figures.
>
> We'd need a big ack from the ia64 team for this, please.

This was found early in December.  I proposed:
http://marc.theaimsgroup.com/?l=linux-kernel&m=113398553428807&w=2
dropping it for all architectures, but got no response.

The problem is the horribly cache unfriendly scan of all percpu
structures ... not too much of a problem for low cpu count, but
really bad when the count gets high (just configured high is
enough to cause the problem in a CONFIG_HOTPLUG_CPU
kernel ... even if the cpu isn't present we still scan).

An alternative if someone really is using these values would be
to compute the sums earlier in the function ... but that would
require a memory allocation to save the per-irq sums.

Unless someone comes up soon with the name of an existing
application that depends on these per-irq sums, consider this

Acked-by: Tony Luck <tony.luck@intel.com>

-Tony

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

* Re: [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
  1 sibling, 0 replies; 5+ messages in thread
From: Jesper Juhl @ 2006-01-22 20:38 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Andrew Morton, linux-kernel

On 1/22/06, Olaf Hering <olh@suse.de> wrote:
> (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

Hmm, this changes userspace visible data... should we be doing that?

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

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

* Re: [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:59   ` Tony Luck
  2006-01-22 20:38 ` Jesper Juhl
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2006-01-22 20:31 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linux-kernel, linux-ia64, Luck, Tony

Olaf Hering <olh@suse.de> wrote:
>
> (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

We'd need a big ack from the ia64 team for this, please.

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

* [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

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-23  0:02 [PATCH] disable per cpu intr in /proc/stat Albert Cahalan
  -- strict thread matches above, loose matches on Subject: below --
2006-01-22 20:22 Olaf Hering
2006-01-22 20:31 ` Andrew Morton
2006-01-22 20:59   ` Tony Luck
2006-01-22 20:38 ` Jesper Juhl

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