Hi,

There is alloconfill() function in gem5. This determines whether data is
allocated in cache upon miss in L1 cache or not.

Ideally, If cache is mostly exclusive then data should not be allocated in
cache upon miss in L1 cache.

But this function loads data in 'mostly exclusive' upon miss in L1 cache in
some cases( if commands are WriteLineReq, ReadReq and WriteReq).

Can anyone explain, why this function
checks  commands(WriteLineReq, ReadReq and WriteReq) in order to fill data
in mostly exclusive cache

https://github.com/gem5/gem5/blob/master/src/mem/cache/cache.hh
/**
  * Determine whether we should allocate on a fill or not. If this
  * cache is mostly inclusive with regards to the upstream cache(s)
  * we always allocate (for any non-forwarded and cacheable
  * requests). In the case of a mostly exclusive cache, we allocate
  * on fill if the packet did not come from a cache, thus if we:
  * are dealing with a whole-line write (the latter behaves much
  * like a writeback), the original target packet came from a
  * non-caching source, or if we are performing a prefetch or LLSC.
  *
  * @param cmd Command of the incoming requesting packet
  * @return Whether we should allocate on the fill
  */
  inline bool allocOnFill(MemCmd cmd) const override
  {
  return clusivity == Enums::mostly_incl ||
  cmd == MemCmd::WriteLineReq ||
  cmd == MemCmd::ReadReq ||
  cmd == MemCmd::WriteReq ||
  cmd.isPrefetch() ||
  cmd.isLLSC();
  }
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to