Skip to content

Conversation

@zephyrols
Copy link
Collaborator

@zephyrols zephyrols commented Jul 31, 2025

The "sendEvent" has been wrongly set as "If it is scheduled and has not been executed yet, it cannot be rescheduled." This results in the inability to update the sendEvent time in a timely manner when more urgent events need to be scheduled.

we put a panic here to check. For test we try checkpoint "/nfs/home/share/jiaxiaoyu/simpoint_checkpoint_zstd_format/spec06_rv64gcb_O3_20m_gcc12.2.0-intFpcOff-jeMalloc/astar_biglakes/562/562_0.202736.zstd", and panic happend.
image

the breakpoint environment
image

this is a early prefetch should be shedule before it.

Change-Id: Id8f470ee02ad111fc6b9f90908dc47835b2be38d

Change-Id: Id8f470ee02ad111fc6b9f90908dc47835b2be38d
@XiangShanRobot
Copy link

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

Standard Performance

Overall Score

PR Master Diff(%)
Score 16.17 16.17 +0.02 🟢

@XiangShanRobot
Copy link

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

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 19.78 19.49 +1.44 🟢

@XiangShanRobot
Copy link

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

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 19.51 19.13 +2.01 🟢

@zephyrols zephyrols requested a review from Copilot July 31, 2025 08:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes scheduling bugs in the memory cache's sendEvent mechanism. The changes address issues where sendEvent scheduling logic was incorrectly checking for already-scheduled events and add assertions to validate state consistency.

  • Removes the early return when sendEvent is already scheduled in PacketQueue::schedSendEvent
  • Adds assertion to ensure sendEvent is not scheduled when waiting on retry
  • Removes hasSchedSendEvent() check in cache allocation logic to always schedule sends when needed

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/mem/packet_queue.cc Comments out sendEvent.scheduled() check and adds assertion for retry state validation
src/mem/cache/base.hh Removes hasSchedSendEvent() condition to unconditionally schedule sends when sched_send is true

Comment on lines 168 to 171
// if (sendEvent.scheduled()) {
// DPRINTF(PacketQueue, "Not scheduling send as already scheduled\n");
// return;
// }
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider removing commented-out code instead of leaving it in the codebase. If this logic might be needed for reference, document the reasoning in a commit message or code comment explaining why this check was removed.

Suggested change
// if (sendEvent.scheduled()) {
// DPRINTF(PacketQueue, "Not scheduling send as already scheduled\n");
// return;
// }
// Removed commented-out code to improve clarity and maintainability.

Copilot uses AI. Check for mistakes.
happy-lx
happy-lx previously approved these changes Aug 1, 2025
jensen-yan
jensen-yan previously approved these changes Aug 6, 2025
@zephyrols zephyrols dismissed stale reviews from jensen-yan and happy-lx via eab8170 August 11, 2025 02:55
Change-Id: I83e76f066684b1cb9ef75b518f265e4aae5d5fb8
@XiangShanRobot
Copy link

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

Standard Performance

Overall Score

PR Previous Commit Diff(%)
Score 16.14 16.17 -0.22 🔴

@XiangShanRobot
Copy link

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

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 20.00 19.99 +0.08 🟢

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

Ideal BTB Performance

Overall Score

PR Previous Commit Diff(%)
Score 20.00 19.78 +1.15 🟢

@XiangShanRobot
Copy link

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

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 22.35 22.38 -0.16 🔴

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

Ideal BTB Performance

Overall Score

PR Previous Commit Diff(%)
Score 22.35 19.51 +14.54 🟢

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

Successfully merging this pull request may close these issues.

5 participants