SimpleSSD / SimpleSSD-Standalone

Open-Source Licensed Educational SSD Simulator for High-Performance Storage and Full-System Evaluations
GNU General Public License v3.0
39 stars 30 forks source link

Displaced tick in trace mode & strict mode #17

Closed yunchih closed 4 years ago

yunchih commented 4 years ago

Execution information

Explain what you want to ask here:

Here's a simple trace:

1 0 48 W
200 80 8 W
15000 80 8 R

Here's the output of SimpleSSD run with the above configurations using the trace:

SimpleSSD Standalone v2.0
0: PAL: Channel |   Way   |   Die   |  Plane  |  Block  |   Page
0: PAL:       2 |       1 |       1 |       4 |     512 |    1024
0: PAL: Multi-plane mode enabled
0: PAL: Superblock multiplier
0: PAL: x4 (Plane)
0: PAL: Page size 16384 -> 65536
0: PAL: Total block count 4096 -> 1024
0: PAL::PALOLD: NAND timing:
0: PAL::PALOLD: Operation |     LSB    |     CSB    |     MSB    |    DMA 0   |    DMA
0: PAL::PALOLD:    READ   |   40000000 |          0 |   65000000 |      16689 |   39062500
0: PAL::PALOLD:    WRITE  |  500000000 |          0 | 1300000000 |   39079188 |       2384
0: PAL::PALOLD:    ERASE  |                           3500000000 |      11920 |       2384
0: FTL: Total physical blocks 1024
0: FTL: Total logical blocks 768
0: FTL: Logical page size 65536
0: FTL::PageMapping: Initialization started
0: FTL::PageMapping: Total logical pages: 786432
0: FTL::PageMapping: Total logical pages to fill: 0 (0.00 %)
0: FTL::PageMapping: Total invalidated pages to create: 0 (0.00 %)
0: FTL::PageMapping: Filling finished. Page status:
0: FTL::PageMapping:   Total valid physical pages: 0 (0.00 %, target: 0, error: 0)
0: FTL::PageMapping:   Total invalid physical pages: 0 (0.00 %, target: 0, error: 0)
0: FTL::PageMapping: Initialization finished
********** Begin of simulation **********
0: info: SIL::None::Driver: Total SSD capacity: 51539607552 bytes
0: info: SIL::None::Driver: Logical Page Size: 65536 bytes
1492500: HIL: WRITE | REQ       1 | LCA 0 + 1 | BYTE 0 + 24576
1492500: ICL::GenericCache: WRITE | REQ       1-1    | LCA 0 | SIZE 24576
1492500: FTL: WRITE | LPN 0
1492500: PAL::PALOLD: WRITE | Block 0 | Page 0
1492500: PAL::PALOLD: WRITE | C     0 | W     0 | D     0 | P     0 | B     0 | P     0
1492500: FTL::PageMapping: WRITE | LPN 0 | 1492500 - 544760760 (543268260)
1492500: ICL: WRITE | LCA 0 + 1 | 1492500 - 549258260 (547765760)
2985000: HIL: WRITE | REQ       2 | LCA 0 + 1 | BYTE 40960 + 4096
2985000: ICL::GenericCache: WRITE | REQ       2-1    | LCA 0 | SIZE 4096
2985000: FTL: WRITE | LPN 0
2985000: PAL::PALOLD: WRITE | Block 1 | Page 0
2985000: PAL::PALOLD: WRITE | C     1 | W     0 | D     0 | P     0 | B     0 | P     0
2985000: FTL::PageMapping: WRITE | LPN 0 | 2985000 - 546253260 (543268260)
2985000: ICL: WRITE | LCA 0 + 1 | 2985000 - 547250760 (544265760)
2985000: warn: Event 6 rescheduled from 549610760 to 547603260
200492500: HIL: READ  | REQ       3 | LCA 0 + 1 | BYTE 40960 + 4096
200492500: ICL::GenericCache: READ  | REQ       3-1    | LCA 0 | SIZE 4096
200492500: FTL: READ  | LPN 0
200492500: PAL::PALOLD: READ  | Block 1 | Page 0
200492500: PAL::PALOLD: READ  | C     1 | W     0 | D     0 | P     0 | B     0 | P     0
200492500: FTL::PageMapping: READ  | LPN 0 | 201192500 - 623566638 (422374138)
200492500: ICL: READ  | LCA 0 + 1 | 200492500 - 623864138 (423371638)
14999000000: CPU: Begin CPU power calculation

Note that the read happens at 15000 us, far away from the previous write. But because the current tick of the simulator is displaced by one slot, PAL mistakenly calculate the response time as if it has encountered a resource conflict (blocked by the previous write).

There is one doNextEvent missing here. The expected output is:

1492500:    HIL: WRITE | REQ       1 | LCA 0 + 1 | BYTE 0 + 24576
200492500:  HIL: WRITE | REQ       2 | LCA 0 + 1 | BYTE 40960 + 4096
14999000000: HIL: READ  | REQ       3 | LCA 0 + 1 | BYTE 40960 + 4096

Thanks for your help!

kukdh1 commented 4 years ago

Hi,

That is the bug of TraceReplayer and I found that the bug is already fixed in our internal version (v2.1). I will backport the patch to public version (v2.0).

Thank you for the report.

kukdh1 commented 4 years ago

Hi,

Please check the latest version.

0: info: SIL::None::Driver: Total SSD capacity: 51539607552 bytes
0: info: SIL::None::Driver: Logical Page Size: 65536 bytes
1492500: HIL: WRITE | REQ       1 | LCA 0 + 1 | BYTE 0 + 24576
1492500: ICL::GenericCache: WRITE | REQ       1-1    | LCA 0 | SIZE 24576
1492500: FTL: WRITE | LPN 0
1492500: PAL::PALOLD: WRITE | Block 0 | Page 0
1492500: PAL::PALOLD: WRITE | C     0 | W     0 | D     0 | P     0 | B     0 | P     0
1492500: FTL::PageMapping: WRITE | LPN 0 | 1492500 - 544760760 (543268260)
1492500: ICL: WRITE | LCA 0 + 1 | 1492500 - 549258260 (547765760)
200492500: HIL: WRITE | REQ       2 | LCA 0 + 1 | BYTE 40960 + 4096
200492500: ICL::GenericCache: WRITE | REQ       2-1    | LCA 0 | SIZE 4096
200492500: FTL: WRITE | LPN 0
200492500: PAL::PALOLD: WRITE | Block 1 | Page 0
200492500: PAL::PALOLD: WRITE | C     1 | W     0 | D     0 | P     0 | B     0 | P     0
200492500: FTL::PageMapping: WRITE | LPN 0 | 200492500 - 743760760 (543268260)
200492500: ICL: WRITE | LCA 0 + 1 | 200492500 - 744758260 (544265760)
15000492500: HIL: READ  | REQ       3 | LCA 0 + 1 | BYTE 40960 + 4096
15000492500: ICL::GenericCache: READ  | REQ       3-1    | LCA 0 | SIZE 4096
15000492500: FTL: READ  | LPN 0
15000492500: PAL::PALOLD: READ  | Block 1 | Page 0
15000492500: PAL::PALOLD: READ  | C     1 | W     0 | D     0 | P     0 | B     0 | P     0
15000492500: FTL::PageMapping: READ  | LPN 0 | 15001192500 - 15081975877 (80783377)
15000492500: ICL: READ  | LCA 0 + 1 | 15000492500 - 15082273377 (81780877)
15082625877: CPU: Begin CPU power calculation              

Thanks.

yunchih commented 4 years ago

Thanks for the fix!