Commit:     c3508f8f341f19f6b1c3f854f144540427668151
Parent:     2618f86e0010fc6703e77af3613bac7ade46efc6
Author:     Ravikiran G Thirumalai <[EMAIL PROTECTED]>
AuthorDate: Sat Jul 21 17:10:19 2007 +0200
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Jul 21 18:37:09 2007 -0700

    x86_64: Avoid too many remote cpu references due to /proc/stat
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/proc/proc_misc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index f133afe..bee251c 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -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]);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to