What states of the MESI protocol matter when using a cache with write policy?

I came across the following question while reading the lecture slides about caching coherency protocols: What MESI states matter when using a cache with write policy?

The answer was also received: me (invalid) and S (generic unmodified) .

My understanding is that the state M (modified exception) doesn't matter as the cache with write policy propagates the changes to main memory anyway.

The E (Exclusive Unmodified) state is irrelevant, as it is only issued on an exclusive read of replacement reads (and is retained with subsequent reads).

Can someone explain the given answer?

+3


source to share


1 answer


As you mentioned, the M state is clearly useless since you never store the changed data in your cache.

Regarding the exclusive state: keep in mind that in a sense it is "stronger" than the shared state, because in WB caches it makes sure that no writes to that row are required to acquire ownership and invalidate other copies in the first place; instead it can write directly to that line without leaving the local cache. In other words, going from E to M is easy, while from S to M is more difficult and requires canceling all the others copied in the first place.



On the other hand, in the WT cache, you already have a guarantee that no one else will contain the modified version of the string, and more importantly, you have nothing to do with a simple jump in the local cache (since you have to write data outside of it anyway). so there's really no need for an exclusive state - you don't get any benefit from using it. In fact, you can actually lose from it, because the presence of an E-state forces you to send snoops on any other core reading the same line (E → S transition).

Of course, when you write something outside, you still have to invalidate all other copies, but you don't need the distinction between E and S to tell you if they usually exist, there is usually a snoop filter or some other list to tell you which kernels to track.

+2


source







All Articles