Skip to content

Commit

Permalink
x86_64: Avoid too many remote cpu references due to /proc/stat
Browse files Browse the repository at this point in the history
Too many remote cpu references due to /proc/stat.

On x86_64, with newer kernel versions, kstat_irqs is a bit of a problem.
On every call to kstat_irqs, the process brings in per-cpu data from all
online cpus.  Doing this for NR_IRQS, which is now 256 + 32 * NR_CPUS
results in (256+32*63) * 63 remote cpu references on a 64 cpu config.
/proc/stat is parsed by common commands like top, who etc, causing lots
of cacheline transfers

This statistic seems useless.  Other 'big iron' arches disable this.

AK: changed to remove for all SMP setups
AK: add comment

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Ravikiran G Thirumalai authored and Linus Torvalds committed Jul 22, 2007
1 parent 2618f86 commit c3508f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/proc/proc_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ static int show_stat(struct seq_file *p, void *v)
}
seq_printf(p, "intr %llu", (unsigned long long)sum);

#if !defined(CONFIG_PPC64) && !defined(CONFIG_ALPHA) && !defined(CONFIG_IA64)
#ifndef CONFIG_SMP
/* Touches too many cache lines on SMP setups */
for (i = 0; i < NR_IRQS; i++)
seq_printf(p, " %u", per_irq_sum[i]);
#endif
Expand Down

0 comments on commit c3508f8

Please sign in to comment.