-
Couldn't load subscription status.
- Fork 55
mem-cache: fix sendEvent schedule time bugs. #499
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
base: xs-dev
Are you sure you want to change the base?
Conversation
Change-Id: Id8f470ee02ad111fc6b9f90908dc47835b2be38d
|
[Generated by GEM5 Performance Robot] Standard PerformanceOverall Score
|
|
[Generated by GEM5 Performance Robot] Ideal BTB PerformanceOverall Score
|
|
[Generated by GEM5 Performance Robot] Ideal BTB PerformanceOverall Score
|
There was a problem hiding this 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 |
src/mem/packet_queue.cc
Outdated
| // if (sendEvent.scheduled()) { | ||
| // DPRINTF(PacketQueue, "Not scheduling send as already scheduled\n"); | ||
| // return; | ||
| // } |
Copilot
AI
Jul 31, 2025
There was a problem hiding this comment.
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.
| // if (sendEvent.scheduled()) { | |
| // DPRINTF(PacketQueue, "Not scheduling send as already scheduled\n"); | |
| // return; | |
| // } | |
| // Removed commented-out code to improve clarity and maintainability. |
Change-Id: I83e76f066684b1cb9ef75b518f265e4aae5d5fb8
|
[Generated by GEM5 Performance Robot] Standard PerformanceOverall Score
|
|
[Generated by GEM5 Performance Robot] Ideal BTB PerformanceOverall Score
[Generated by GEM5 Performance Robot] Ideal BTB PerformanceOverall Score
|
|
[Generated by GEM5 Performance Robot] Ideal BTB PerformanceOverall Score
[Generated by GEM5 Performance Robot] Ideal BTB PerformanceOverall Score
|
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.

the breakpoint environment

this is a early prefetch should be shedule before it.
Change-Id: Id8f470ee02ad111fc6b9f90908dc47835b2be38d