OpenXiangShan / XiangShan

Open-source high-performance RISC-V processor
Other
4.74k stars 646 forks source link

fix(PageTableCache): fix ptwcache refill logic when exception #3588

Closed good-circle closed 1 week ago

good-circle commented 2 weeks ago

Since L2 Cache access width is 512 bits, 8 PTE items are refilled into page cache together. In previous design, when an exception occurs in one of the 8 refilled PTE entries, none of the 8 entries will be refilled. In this case, if there is a normal entry in one of the 8 neighbouring page tables, it will not be refillled because of the exception in the other entries, which will lead to blocking.

This commit fixes this problem. vs means that if one of the 8 consecutive page tables has an exception, the corresponding vs will be forced to be false when judging hit. onlypf means that if x2slate is not enabled, and only pf occurs, then the pf information will be returned. Except for the onlypf case, the rest of the exceptions will not be refilled in page cache (none of them will hit).

XiangShanRobot commented 1 week ago
[Generated by IPC robot] commit: 21120a4c79a19f42084d285f92a8370459f7df12 commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
21120a4 1.865 0.450 2.695 1.192 2.837 2.488 2.400 0.921 1.397 1.453 3.411 2.752 2.423 3.211
master branch: commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
6a8b2d5 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
a1d4641 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
110fa54 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
43f0874 1.865 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
b528775 1.865 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
c945b57 1.865 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
2ea10b4 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
90d824c 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
7e1c607 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
XiangShanRobot commented 1 week ago
[Generated by IPC robot] commit: 16dd23ea118525757e892bface1421f737e82e64 commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
16dd23e 1.934 0.450 2.695 1.192 2.812 2.465 2.399 0.918 1.397 1.609 3.424 2.761 2.429 3.275
master branch: commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
b4d41c1 1.858 0.450 2.695 1.186 2.801 2.445 2.400 0.919 1.397 1.433 3.393 2.747 2.423 3.212
52fc0c9 0.450 2.695 2.400 1.397 2.747
b7dc2d1 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
6a8b2d5 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
a1d4641 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
110fa54 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
43f0874 1.865 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
b528775 1.865 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
c945b57 1.865 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212
2ea10b4 1.855 0.450 2.695 1.186 2.832 2.488 2.400 0.919 1.397 1.454 3.415 2.747 2.423 3.212