Software Archive
Read-only legacy content
17061 Discussions

question on cache eviction

King_Crimson
Beginner
837 Views

I'm experimenting on cache eviction in my code using _mm_clevict(), and have the following observations:

(1) if data are evicted from L1 alone (_MM_HINT_T0), the code is slowed by ~30%.

(2) if data are evicted from L2 alone (_MM_HINT_T1), the code is slowed by ~70%.

(3) if data are evicted from both L1 and L2, the code is still slowed by ~70%.

I'm confused by (3), as I think some additional loads should miss both L1 and L2 compared to (2), which should cause further latency. Any thoughts? Thanks!

0 Kudos
1 Solution
James_C_Intel2
Employee
837 Views

The caches are inclusive, therefore eviction from the L2$ implies eviction from the L1$ too. Your  last two cases are therefore identical (give or take the extra eviction instructions you execute!)

View solution in original post

0 Kudos
1 Reply
James_C_Intel2
Employee
838 Views

The caches are inclusive, therefore eviction from the L2$ implies eviction from the L1$ too. Your  last two cases are therefore identical (give or take the extra eviction instructions you execute!)

0 Kudos
Reply