lkml.org 
[lkml]   [1999]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[RFC] cache line contention for the per-cpu counters
I've noticed that many per-cpu counters are simple arrays:

unsigned int local_bh_count[NR_CPUS];
unsigned int local_irq_count[NR_CPUS];
atomic_t nmi_counter[NR_CPUS];

I guess these variables are heavily used, and that the cachelines will
remain SHARED in all cpu's in the system. Lots of completely superflous
bus traffic.

What about reordering the arrays, and cache-line aligning everything?
ie.

struct {
atomic_t nmi_counter;
unsigned int local_bh_count;
unsigned int local_irq_count;
cpuinfo_x86 data;
...
} cpu[NR_CPUS];

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.047 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site