Exclusive or Inclusive caches

647 views
Skip to first unread message

Hamid Reza

unread,
Dec 12, 2013, 10:09:27 AM12/12/13
to snip...@googlegroups.com
Hi group,

As you know caches can be Inclusive, all data in the L1 cache must also be somewhere in the L2 cache (like the AMD Athlon), Exlusive, data is guaranteed to be in at most one of the L1 and L2 caches, never in both. Still other processors (like the Intel Pentium II, III, and 4), do not require that data in the L1 cache also reside in the L2 cache, although it may often do so.

Could you tell me which type of above cache types has been implemented in Sniper?

Thanks

Wim Heirman

unread,
Dec 12, 2013, 10:37:27 AM12/12/13
to snip...@googlegroups.com
Hamid,

Sniper implements inclusive caches at all levels.

Regards,
Wim



--
--
--
You received this message because you are subscribed to the Google
Groups "Sniper simulator" group.
To post to this group, send email to snip...@googlegroups.com
To unsubscribe from this group, send email to
snipersim+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/snipersim?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Sniper simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snipersim+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hamid Reza Khaleghzadeh

unread,
Dec 12, 2013, 1:56:48 PM12/12/13
to snip...@googlegroups.com
Hi Wim,

As you said, "Sniper implements inclusive caches at all levels". But, I think inclusive cache cannot simulate Clovertown correctly. Consider block1 which is loaded to core0 and core1 (these two cores inside into the same package). So, suppose block1 evicted from L1 cache of core1, and block1 must be evicted from L1 cache of core0, and shared L2, too. This eviction has negative effect on thread affinity and performance. Isn't it?


You received this message because you are subscribed to a topic in the Google Groups "Sniper simulator" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/snipersim/_NJu8DXCVVs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to snipersim+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Hamid Reza Khaleghzadeh
http://hkhaleghzadeh.webs.com


Aiesha Almaslam

unread,
Jun 27, 2016, 4:34:24 AM6/27/16
to Sniper simulator, khaleg...@gmail.com
hi Wim
is there any way to implement exclusive property for caches ?
or guide me to what files to modify for this purpose?


thank you alot
Aiesha

Wim Heirman

unread,
Jul 7, 2016, 3:03:21 AM7/7/16
to snip...@googlegroups.com
Hi Aiesha,

You can definitely implement exclusive caches, changes will be isolated to cache_cntlr.cc. There are a few cases where the code now assumes inclusion, which you'll have to work around:
- on a cache miss, currently the LLC will be filled with the line (the insertCacheBlock call made from processShRepFromDramDirectory and processExRepFromDramDirectory), and the L1 will make another call through processShmemReqFromPrevCache and expect the line to be in the LLC so it can do the fill using copyDataFromNextLevel. You'll have to make a mechanism here where incoming lines are stored elsewhere for the L1 to access.
- on a dirty eviction from the L1, it will expect to find the line in the next-level cache (in insertCacheBlock, when eviction=true and state=M, m_next_cache_cntlr->writeCacheBlock is called which fails if the line is not in the L2). You can do two things here: install the dirty line in the L2 (potentially evicting another dirty line), or write the line straight through to DRAM (look at the code under the /* Send dirty block to directory */ comment).
- not sure about this last part but there may need to be changes here as well: when an invalidate/writeback request is received from the tag directory (processInvReqFromDramDirectory/processFlushReqFromDramDirectory/processWbReqFromDramDirectory), updateCacheBlock is called on the LLC. In an inclusive hierarchy the LLC can act as a snoop filter, but for an exclusive hierarchy you always need to propagate the invalidation to all cache levels. It looks like the top of updateCacheBlock is doing that anyway (where it iterates over m_prev_cache_cntlrs and calls updateCacheBlock on them), but you'll need to make sure an INV_REP is sent even if the line is not in the LLC>

Regards,
Wim


--
--
--
You received this message because you are subscribed to the Google
Groups "Sniper simulator" group.
To post to this group, send email to snip...@googlegroups.com
To unsubscribe from this group, send email to
snipersim+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/snipersim?hl=en

---
You received this message because you are subscribed to the Google Groups "Sniper simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snipersim+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages