Re: strange CPU speedups with SMP on Athlon 64 X2
From: Nick Piggin
Date: Wed Aug 31 2005 - 06:59:50 EST
Nathan Becker wrote:
I would be happy to post my exact C source that I use to do the
benchmark, but I wanted to get some feedback first in case I'm just
doing something stupid. Also, since I'm not subscribed to this list,
please cc me directly regarding this topic.
Hi Nathan,
Cache issues may explain this. When 2 processes are allocating
memory in parallel they'll be given different interleavings of
pages which could explain the speedup.
Start one process, get it to memset all its memory, then pause
it and do the same thing. Then set them both running at the same
time (ie. after they've each touched their memory in turn), what
do you see?
(By memset()ing the memory, you'll cause the kernel to actually
allocate a physical page. By doing that one after the other, we
hope to eliminate interleaving issues.)
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/