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

fix(bank_conflict): Selecting the oldest Load causes a conflict #4036

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

Anzooooo
Copy link
Member

@Anzooooo Anzooooo commented Dec 12, 2024

This modification changes load bank conflict from [default priority 0 1 2] to [so that the oldest Load does not have a bank conflict].

In the following, Load 0 refers to LoadUnit 0.

For example, before:
Load 0 lqidx 5
Load 1 lqidx 3
Load 2 lqidx 8
Assuming that three Loads have bank conflict, then we will default to making Load1 and Load2 have bank conflict so that they can be replayed.


However, this may lead to deadlocks in some cases.
For example:
Load 0 robidx 7
Store 0 robidx 6
Load 1 robidx 5

Store 0 is dependent on Load 1 for data, while Load 0 is dependent on Store 0 for data, and Load 0 and Load 1 will have a bank conflict.
In this case then, Load 1 will Replay because of bank conflict and Load 0 will Replay because of forward fault(because of misalign).


With the modification, we will choose to make the oldest Load not generate bank conflict, thus circumventing the jamming problem.
Note !!! This may introduce performance fluctuations (up or down)

@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: 27c4565

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
27c4565 1.937 0.451 2.697 1.227 2.866 2.462 2.393 0.930 1.425 2.054 3.437 2.718 2.367 3.210

master branch:

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
f346d72 1.899 0.450 2.701 1.219 2.833 2.461 2.395 0.921 1.426 2.022 3.432 2.707 2.368 3.227
d29ebcf 1.899 0.450 2.701 1.219 2.833 2.461 2.395 0.921 1.426 2.022 3.432 2.707 2.368 3.227
9cf1e44 1.899 0.450 2.701 1.219 2.833 2.461 2.395 0.921 1.426 2.022 3.432 2.707 2.368 3.227
98d2aaa 1.899 0.450 2.701 1.219 2.833 2.461 2.395 0.921 1.426 2.022 3.432 2.707 2.368 3.227
433cc30 1.899 0.450 2.701 1.219 2.833 2.461 2.395 0.921 1.426 2.022 3.432 2.707 2.368 3.227

@Anzooooo Anzooooo marked this pull request as ready for review December 13, 2024 02:30
@Anzooooo Anzooooo requested review from cz4e and Maxpicca-Li December 13, 2024 02:31
@linjuanZ linjuanZ merged commit 8ffb12e into master Dec 13, 2024
9 checks passed
@linjuanZ linjuanZ deleted the wzz-fix-conflit branch December 13, 2024 02:52
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.

4 participants