GEM5 icon indicating copy to clipboard operation
GEM5 copied to clipboard

mem-cache: enhance address handle and refect composite prefetcher

Open zephyrols opened this issue 6 months ago β€’ 11 comments

  • Add isCompositePrefetcher flag to prefetch::Base to indicate whether the prefetcher is a composite one containing sub-prefetchers.

    • When set to true, both virtual and physical addresses are passed to sub-prefetchers.
    • Sub-prefetchers are responsible for deciding which address to use in calculatePrefetch.
  • Refactor PrefetchInfo and PrefetchCmd:

    • PrefetchInfo now supports carrying both virtual and physical addresses.
    • PrefetchCmd can now issue prefetches based on physical addresses.
    • Renamed several members to improve clarity and reflect their semantics more accurately (e.g., distinguishing between virtual and physical addresses, target level, etc.).
  • Refactor prefetch::Queue:

    • Supports address duplication checks using both virtual and physical addresses for squash handling.
    • Decouples address translation decision-making from the prefetcher’s use_virtual_address flag; decisions now depend on the address properties of each PrefetchCmd.
    • Extracts logic for dropping prefetches into a dedicated shouldDropPrefetch function.
    • Fixes a bug in alreadyInQueue where an incorrect loop break condition could cause priority updates to target the wrong entry.
  • Introduce PrefetchFilter class:

    • A new modular filter component intended to eventually replace the legacy pfLRUFilter (lru_cache<Addr, Addr>).
    • Provides a unified interface to filter both virtual and physical address prefetches.
    • Only declared and partially implemented in this commit; integration and replacement to follow in later commits.
    • Designed for improved flexibility and extensibility in prefetch filtering logic.
  • Refactor WorkerPrefetcher:

    • Removes redundant logic.
    • Cross-level prefetches to upper-level prefetchers are scheduled only when the local buffer is not empty.
  • Refactor CompositeWithWorkerPrefetcher:

    • Removes redundant logic.

Change-Id: Ib12a66c35f313d795d3b28fdf7507ee7fb9b808e

zephyrols avatar Jun 13 '25 04:06 zephyrols

[Generated by GEM5 Performance Robot] commit: 76ce65496dbbf608e1be7ebb6e6943fa7abc592d workflow: gem5 Performance Test

Standard Performance

Overall Score

PR Master Diff(%)
Score 16.21 16.22 -0.01 πŸ”΄

XiangShanRobot avatar Jun 13 '25 06:06 XiangShanRobot

[Generated by GEM5 Performance Robot] commit: 76ce65496dbbf608e1be7ebb6e6943fa7abc592d workflow: gem5 Ideal BTB Performance Test

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 20.63 20.61 +0.09 🟒

XiangShanRobot avatar Jun 13 '25 06:06 XiangShanRobot

[Generated by GEM5 Performance Robot] commit: 767f14c6fcf2719526625e1e3de4f7ebbcef1870 workflow: gem5 Performance Test

Standard Performance

Overall Score

PR Master Diff(%)
Score 16.15 16.17 -0.13 πŸ”΄

[Generated by GEM5 Performance Robot] commit: 767f14c6fcf2719526625e1e3de4f7ebbcef1870 workflow: gem5 Performance Test

Standard Performance

Overall Score

PR Previous Commit Diff(%)
Score 16.15 16.15 0.00

XiangShanRobot avatar Jul 16 '25 02:07 XiangShanRobot

[Generated by GEM5 Performance Robot] commit: 767f14c6fcf2719526625e1e3de4f7ebbcef1870 workflow: gem5 Ideal BTB Performance Test

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 19.49 19.50 -0.04 πŸ”΄

[Generated by GEM5 Performance Robot] commit: 767f14c6fcf2719526625e1e3de4f7ebbcef1870 workflow: gem5 Ideal BTB Performance Test

Ideal BTB Performance

Overall Score

PR Previous Commit Diff(%)
Score 19.49 19.77 -1.43 πŸ”΄

XiangShanRobot avatar Jul 16 '25 02:07 XiangShanRobot

[Generated by GEM5 Performance Robot] commit: 767f14c6fcf2719526625e1e3de4f7ebbcef1870 workflow: gem5 Simple RVV Performance Test (Ideal BTB)

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 19.18 19.16 +0.13 🟒

[Generated by GEM5 Performance Robot] commit: 767f14c6fcf2719526625e1e3de4f7ebbcef1870 workflow: gem5 Simple RVV Performance Test (Ideal BTB)

Ideal BTB Performance

Overall Score

PR Previous Commit Diff(%)
Score 19.18 19.41 -1.20 πŸ”΄

XiangShanRobot avatar Jul 16 '25 02:07 XiangShanRobot

[Generated by GEM5 Performance Robot] commit: b1ac8827e5b51d0d3d8a3327592087a06d86c825 workflow: gem5 Ideal BTB Performance Test

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 19.77 19.50 +1.41 🟒

XiangShanRobot avatar Jul 16 '25 02:07 XiangShanRobot

[Generated by GEM5 Performance Robot] commit: b1ac8827e5b51d0d3d8a3327592087a06d86c825 workflow: gem5 Simple RVV Performance Test (Ideal BTB)

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 19.41 19.16 +1.35 🟒

XiangShanRobot avatar Jul 16 '25 02:07 XiangShanRobot

[Generated by GEM5 Performance Robot] commit: b1ac8827e5b51d0d3d8a3327592087a06d86c825 workflow: gem5 Performance Test

Standard Performance

Overall Score

PR Master Diff(%)
Score 16.15 16.17 -0.13 πŸ”΄

XiangShanRobot avatar Jul 16 '25 02:07 XiangShanRobot

[Generated by GEM5 Performance Robot] commit: 186edd1b87a7f66d326c8e687e71791353159711 workflow: gem5 Performance Test

Standard Performance

Overall Score

PR Master Diff(%)
Score 16.15 16.17 -0.10 πŸ”΄

XiangShanRobot avatar Aug 01 '25 14:08 XiangShanRobot

[Generated by GEM5 Performance Robot] commit: 186edd1b87a7f66d326c8e687e71791353159711 workflow: gem5 Ideal BTB Performance Test

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 19.76 19.77 -0.02 πŸ”΄

XiangShanRobot avatar Aug 01 '25 14:08 XiangShanRobot

[Generated by GEM5 Performance Robot] commit: 186edd1b87a7f66d326c8e687e71791353159711 workflow: gem5 Simple RVV Performance Test (Ideal BTB)

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 19.46 19.47 -0.08 πŸ”΄

XiangShanRobot avatar Aug 01 '25 19:08 XiangShanRobot