disable per cpu intr in /proc/stat
PATCH 1/1 disable per cpu intr in /proc/stat
(No bugzilla or benchmark)
From: [email protected]
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.
fs/proc/proc_misc.c renamed from fs/proc/proc_misc.c.~1~ +1 -1
@@ -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
Signature · 2 lines
short story of a lazy sysadmin: alias appserv=wotan
Quoted 12 lines · Olaf Hering
(No bugzilla or benchmark)
From: [email protected]
Subject: Reading/proc/statis slooowDon't compute and display the per-irq sums on ia64 either, too much overhead for mostly useless figures.
fs/proc/proc_misc.c static int show_stat(struct seq_file *p, · line 504
Quoted 8 lines
fs/proc/proc_misc.c renamed from fs/proc/proc_misc.c.~1~ +1
-1@@ -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.
Quoted 11 lines · Olaf Hering
(No bugzilla or benchmark)
From: [email protected]
Subject: Reading/proc/statis slooowDon't compute and display the per-irq sums on ia64 either, too much overhead for mostly useless figures.
fs/proc/proc_misc.c 2005-12-06 18:13:51.211896515 +0100 static int show_stat(struct seq_file *p, · line 504
Quoted 8 lines
fs/proc/proc_misc.c 2005-12-06 18:13:51.211896515 +0100 renamed from fs/proc/proc_misc.c.~1~ 2005-12-06 18:12:28.840059961 +0100 +1
-1@@ -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 <[email protected]>
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
Tony Luck
Acked-byQuoted 5 lines · Andrew Morton
Quoted 2 lines · Olaf Hering
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&m3398553428807&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
-Tony