[concurrency-interest] Multi-core testing, help with findings

David Holmes dcholmes at optusnet.com.au
Tue Dec 12 17:51:37 EST 2006


David,

> From what I can read in this thread so far - it's either a
> scheduling issue with the OS, or
> I'm being too aggressive with use of the volatile

Both. The scheduling issue gives the busy-wait thread far too much CPU time.
The fact that it is doing violatile accesses means that it is hitting the
memory system in a way that interferes with the other threads too.

> (I chose this since I wanted to see what
> the processors would act like when forced to go to main memory,
> rather than fetching from their 4MB cache.).

Please don't think of volatile in this way - the old model of "main memory"
vs. "local memory" was conceptually simple but doesn't reflect how actual
implementations work. The value will still be read from the cache if it is
present, the cache coherency hardware takes care of everything. It is the
fences/memory-barriers that add the overhead.

> Oh, and it's Linux kernel 2.6.17.

I've learnt that Ubuntu has some interesting behaviour in other areas too -
ie you can use real-time scheduling (SCHED_FIFO) without needing root
access. I'm trying to find out whether this is Ubuntu specific modifications
or whether these are kernel features.

Cheers,
David Holmes



More information about the Concurrency-interest mailing list