Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue of mistakenly treating normal data as metadata #1

Open
qcjiang opened this issue Feb 21, 2024 · 0 comments
Open

Issue of mistakenly treating normal data as metadata #1

qcjiang opened this issue Feb 21, 2024 · 0 comments

Comments

@qcjiang
Copy link

qcjiang commented Feb 21, 2024

When oracle_translation is enabled, "ddr.page-conflict-metadata-to-metadata" and "nuca-cache.reads-metadata" is still not zero (Which means normal data is recognized as metadata).

Which can be fixed by:

diff --git a/sniper/common/core/memory_subsystem/dram/dram_cntlr_interface.cc b/sniper/common/core/memory_subsystem/dram/dram_cntlr_interface.cc
index 3bd9b1d..effbe61 100755
--- a/sniper/common/core/memory_subsystem/dram/dram_cntlr_interface.cc
+++ b/sniper/common/core/memory_subsystem/dram/dram_cntlr_interface.cc
@@ -18,7 +18,7 @@ void DramCntlrInterface::handleMsgFromTagDirectory(core_id_t sender, PrL1PrL2Dra
          Byte data_buf[getCacheBlockSize()];
          SubsecondTime dram_latency;
          HitWhere::where_t hit_where;
-         boost::tie(dram_latency, hit_where) = getDataFromDram(address, shmem_msg->getRequester(), data_buf, msg_time, shmem_msg->getPerf(),shmem_msg->getBlockType());
+         boost::tie(dram_latency, hit_where) = getDataFromDram(address, shmem_msg->getRequester(), data_buf, msg_time, shmem_msg->getPerf(),shmem_msg->getBlockType() == CacheBlockInfo::block_type_t::PAGE_TABLE);

          getShmemPerfModel()->incrElapsedTime(dram_latency, ShmemPerfModel::_SIM_THREAD);

@@ -39,7 +39,7 @@ void DramCntlrInterface::handleMsgFromTagDirectory(core_id_t sender, PrL1PrL2Dra

       case PrL1PrL2DramDirectoryMSI::ShmemMsg::DRAM_WRITE_REQ:
       {
-         putDataToDram(shmem_msg->getAddress(), shmem_msg->getRequester(), shmem_msg->getDataBuf(), msg_time, shmem_msg->getBlockType());
+         putDataToDram(shmem_msg->getAddress(), shmem_msg->getRequester(), shmem_msg->getDataBuf(), msg_time, shmem_msg->getBlockType() == CacheBlockInfo::block_type_t::PAGE_TABLE);

          // DRAM latency is ignored on write

diff --git a/sniper/common/core/memory_subsystem/pr_l1_pr_l2_dram_directory_msi/dram_directory_cntlr.cc b/sniper/common/core/memory_subsystem/pr_l1_pr_l2_dram_directory_msi/dram_directory_cntlr.cc
index 47b802e..0954a8a 100755
--- a/sniper/common/core/memory_subsystem/pr_l1_pr_l2_dram_directory_msi/dram_directory_cntlr.cc
+++ b/sniper/common/core/memory_subsystem/pr_l1_pr_l2_dram_directory_msi/dram_directory_cntlr.cc
@@ -652,7 +652,7 @@ DramDirectoryCntlr::retrieveDataAndSendToL2Cache(ShmemMsg::msg_t reply_msg_type,
          SubsecondTime nuca_latency;
          HitWhere::where_t hit_where;
          Byte nuca_data_buf[getCacheBlockSize()];
-         boost::tie(nuca_latency, hit_where) = m_nuca_cache->read(address, nuca_data_buf, getShmemPerfModel()->getElapsedTime(ShmemPerfModel::_SIM_THREAD), orig_shmem_msg->getPerf(), true,orig_shmem_msg->getBlockType());
+         boost::tie(nuca_latency, hit_where) = m_nuca_cache->read(address, nuca_data_buf, getShmemPerfModel()->getElapsedTime(ShmemPerfModel::_SIM_THREAD), orig_shmem_msg->ge
tPerf(), true,orig_shmem_msg->getBlockType() == CacheBlockInfo::block_type_t::PAGE_TABLE);

          getShmemPerfModel()->incrElapsedTime(nuca_latency, ShmemPerfModel::_SIM_THREAD);

@@ -1234,7 +1234,7 @@ DramDirectoryCntlr::sendDataToNUCA(IntPtr address, core_id_t requester, Byte* da
          address, data_buf,
          eviction, evict_address, evict_buf,
          getShmemPerfModel()->getElapsedTime(ShmemPerfModel::_SIM_THREAD),
-         count,block_type
+         count,block_type == CacheBlockInfo::block_type_t::PAGE_TABLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant