Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/50352 )
(
5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: mem: Add a page_bytes parameter to the classic prefetcher.
......................................................................
mem: Add a page_bytes parameter to the classic prefetcher.
This parameter is used to figure out if two addresses are on the same or
different pages, and could be used to find what page they were on and
the page offset, although it doesn't look like the later two are
actually used.
This value could possibly come from the TLB parameter attached to the
prefetcher, but making it explicit makes these more symmetric with the
Ruby prefetcher, and reduces the complexity of the TLB implementation.
Change-Id: I6921943c49af19971b84225ecfd1127304363426
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50352
Tested-by: kokoro <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M src/mem/cache/prefetch/base.cc
M src/mem/cache/prefetch/Prefetcher.py
2 files changed, 25 insertions(+), 1 deletion(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/mem/cache/prefetch/Prefetcher.py
b/src/mem/cache/prefetch/Prefetcher.py
index 5346937..62b5841 100644
--- a/src/mem/cache/prefetch/Prefetcher.py
+++ b/src/mem/cache/prefetch/Prefetcher.py
@@ -81,6 +81,8 @@
"Notify the hardware prefetcher on hit on prefetched lines")
use_virtual_addresses = Param.Bool(False,
"Use virtual addresses for prefetching")
+ page_bytes = Param.MemorySize('4KiB',
+ "Size of pages for virtual addresses")
def __init__(self, **kwargs):
super(BasePrefetcher, self).__init__(**kwargs)
diff --git a/src/mem/cache/prefetch/base.cc b/src/mem/cache/prefetch/base.cc
index 06d2b91..cb4c1e8 100644
--- a/src/mem/cache/prefetch/base.cc
+++ b/src/mem/cache/prefetch/base.cc
@@ -98,7 +98,7 @@
lBlkSize(floorLog2(blkSize)), onMiss(p.on_miss), onRead(p.on_read),
onWrite(p.on_write), onData(p.on_data), onInst(p.on_inst),
requestorId(p.sys->getRequestorId(this)),
- pageBytes(p.sys->getPageBytes()),
+ pageBytes(p.page_bytes),
prefetchOnAccess(p.prefetch_on_access),
prefetchOnPfHit(p.prefetch_on_pf_hit),
useVirtualAddresses(p.use_virtual_addresses),
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50352
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I6921943c49af19971b84225ecfd1127304363426
Gerrit-Change-Number: 50352
Gerrit-PatchSet: 9
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s