Hi all,
On 'current' processors (say core2, i7, amd phenom), when you write X to memory, what happens next?
I guess if X is register allocated, then you're done.
If X lives in memory somewhere, then you check the L1 cache (if X isn't there, bring it in). Update the value in L1.
Now, does updating the L1 value require you to also update the value in L2? Similarly, does updating the value in L2 also require updating the value in RAM? I imagine the answer here is "sometimes." lol
Or does the write only get propagated down the hierarchy when the line X is on gets evicted? i.e., do modern processors "gather" all writes to the same cache line & handle the actual writing as infrequently (lazily) as possible?
I think the phrases I'm looking for are 'write-back' and 'write-through'. But I'm having trouble googling for my answers b/c most/all results are from people asking configuration questions for their SSDs or whatever. I'm wondering how 'current' processors handle memory writes. (Also I'm assuming we aren't interacting w/SSE's non-temporal write instructions.)
Thanks,
-Eric
On 'current' processors (say core2, i7, amd phenom), when you write X to memory, what happens next?
I guess if X is register allocated, then you're done.
If X lives in memory somewhere, then you check the L1 cache (if X isn't there, bring it in). Update the value in L1.
Now, does updating the L1 value require you to also update the value in L2? Similarly, does updating the value in L2 also require updating the value in RAM? I imagine the answer here is "sometimes." lol
Or does the write only get propagated down the hierarchy when the line X is on gets evicted? i.e., do modern processors "gather" all writes to the same cache line & handle the actual writing as infrequently (lazily) as possible?
I think the phrases I'm looking for are 'write-back' and 'write-through'. But I'm having trouble googling for my answers b/c most/all results are from people asking configuration questions for their SSDs or whatever. I'm wondering how 'current' processors handle memory writes. (Also I'm assuming we aren't interacting w/SSE's non-temporal write instructions.)
Thanks,
-Eric