What is false sharing? My understanding is if two different processors are both writing to different data (that happens to lie on the same cache line), then they are "false sharing" that cache line.
Is this a correct understanding?
emt
@rrudolph I think that's an accurate definition. False sharing occurs when two different processors are writing to different addresses, but the addresses happen to fall on the same cache line. Since these two processors are running in parallel, the cache line will continuously bounce between the two, as they both are requesting exclusive access to the line. This generates significant amounts of artifactual communication due to the coherence protocol.
sstritte
Inherent communication is fundamental to the algorithm and must occur.
Artifactual communication is all other communication. False sharing is artifactual communication. It occurs when two processors are writing to different addresses that happen to be in the same cache line.
apadwekar
Other examples of artifactual communication are loading the entire cache line and using only a part of it, broadcast costs, and costs associated with memory being located further than is optimal.
Drizzle
So I had been told that artifactual communication and false sharing were basically the same thing. Are there any major distinctions at all?
What is false sharing? My understanding is if two different processors are both writing to different data (that happens to lie on the same cache line), then they are "false sharing" that cache line.
Is this a correct understanding?
@rrudolph I think that's an accurate definition. False sharing occurs when two different processors are writing to different addresses, but the addresses happen to fall on the same cache line. Since these two processors are running in parallel, the cache line will continuously bounce between the two, as they both are requesting exclusive access to the line. This generates significant amounts of artifactual communication due to the coherence protocol.
Inherent communication is fundamental to the algorithm and must occur.
Artifactual communication is all other communication. False sharing is artifactual communication. It occurs when two processors are writing to different addresses that happen to be in the same cache line.
Other examples of artifactual communication are loading the entire cache line and using only a part of it, broadcast costs, and costs associated with memory being located further than is optimal.
So I had been told that artifactual communication and false sharing were basically the same thing. Are there any major distinctions at all?