Hi Saideepak, In the classic memory system when you configure the cache to be mostly inclusive, you always allocate on fetches and writebacks.
There are a few cases where mostly-inclusive deviates from strictly-inclusive and iirc the most common one should be when a cache (e.g., LLC) evicts a line (due to a replacement) and a cache above it (data cache) has a copy of the line. If you care about this and you want to avoid it, you can either 1) send a snoop to fetch (if dirty) and invalidate the line above, or 2) figure out if the line is cached above and if yes choose an alternative victim. The 2nd solution should be easy to implement, you can use the isCachedAbove() function. The 1st might be a bit trickier but feasible. In any case, note that enforcing strictly inclusive behavior will increase traffic significantly (at least +1 snoop on every replacement). Someone else can comment on ruby as I am not familiar with the policies we support. Nikos On 07/09/2020 12:36, Saideepak Bejawada via gem5-users wrote:
Hi all, I found that the classic caches in gem5 are either mostly inclusive/mostly exclusive. I need the cache to be strictly inclusive i.e if a block gets evicted from L2 that has to be evicted from L1 too. Apart from that, I have done some of my work in classic caches already. 1. Is it possible to make classic cache strictly inclusive? Or is it better to switch to ruby caches? 2. In ruby caches, how can I change the clusivity of caches(which file to modify or is it fixed with the protocols)? 3. What files do I have to modify to make changes in a ruby cache? In classic, I have made changes to src/mem/cache(cache.cc, cache.hh) files. In ruby they are src/mem/ruby/structures(CacheMemory.cc/hh). Can someone confirm this? Thanks for your time and any comments are welcome. - Saideepak. _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s