Re: [RFC] cache line contention for the per-cpu counters

Jes Sorensen (Jes.Sorensen@cern.ch)
30 Oct 1999 01:27:31 +0200


>>>>> "Manfred" == Manfred Spraul <manfreds@colorfullife.com> writes:

Manfred> I've noticed that many per-cpu counters are simple arrays:
Manfred> unsigned int local_bh_count[NR_CPUS]; unsigned int
Manfred> local_irq_count[NR_CPUS]; atomic_t nmi_counter[NR_CPUS];

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

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

Your suggestion makes a ton of sense to me, however it would be
interesting to try and apply a patch like this to my Gigabit Ethernet
test boxes and see if it makes a difference (note. Ingo's per-cpu slab
cache fix showed a significant improvement). I you do a patch I'd love
to test it, otherwise I shall try to see if I can find the time to
implement it and bench it (been back for a week and still trying to
catch up on email).

Jes

-
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/