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

Add experimental unbounded 32-bit arena support #156

Merged
merged 2 commits into from
Jun 15, 2024
Merged

Conversation

fwsGonzo
Copy link
Owner

@fwsGonzo fwsGonzo commented Jun 15, 2024

The initial code to map the entire 4GB address space for 32-bit guests in order to avoid bound-checks on memory reads and writes. So far the performance increase is fairly modest, < 10%.

$ VERBOSE=1 ./rvlinux -v ~/github/coremark/coremark-rv32g_b 
* Loading program of size 75145 from 0x7f6ba52ec010 to virtual 0x10000
* Program segment readable: 1 writable: 0  executable: 1
* Loading program of size 1864 from 0x7f6ba52fe59c to virtual 0x2358c
* Program segment readable: 1 writable: 1  executable: 0
* Entry is at 0x109f4
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 14508
Total time (secs): 14.508000
Iterations/Sec   : 20678.246485
Iterations       : 300000
Compiler version : GCC13.2.0
Compiler flags   : -O3 -DPERFORMANCE_RUN=1  
Memory location  : Please put data memory location here
			(e.g. code in flash, data on heap etc)
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0xcc42
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 20678.246485 / GCC13.2.0 -O3 -DPERFORMANCE_RUN=1   / Static
>>> Program exited, exit code = 0 (0x0)
Instructions executed: 119355767074  Runtime: 19870.079ms  Insn/s: 6007mi/s
Pages in use: 25 (100 kB virtual memory, total 319 kB)

@fwsGonzo
Copy link
Owner Author

TCC benefitted from using a static arena pointer, instead of the indirection.

$ VERBOSE=1 ./rvlinux -v ~/github/coremark/coremark-rv32g_b 
* Loading program of size 75145 from 0x79187a6ef010 to virtual 0x10000
* Program segment readable: 1 writable: 0  executable: 1
* Loading program of size 1864 from 0x79187a70159c to virtual 0x2358c
* Program segment readable: 1 writable: 1  executable: 0
Emitted 17963 accelerated instructions and 1312 functions. GP=0x23FF8
* Entry is at 0x109f4
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 20269
Total time (secs): 20.269000
Iterations/Sec   : 5427.006759
Iterations       : 110000
Compiler version : GCC13.2.0
Compiler flags   : -O3 -DPERFORMANCE_RUN=1  
Memory location  : Please put data memory location here
			(e.g. code in flash, data on heap etc)
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0x33ff
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 5427.006759 / GCC13.2.0 -O3 -DPERFORMANCE_RUN=1   / Static
>>> Program exited, exit code = 0 (0x0)
Instructions executed: 35161346339  Runtime: 22312.225ms  Insn/s: 1576mi/s
Pages in use: 25 (100 kB virtual memory, total 319 kB)

@fwsGonzo fwsGonzo merged commit dfc9fdd into master Jun 15, 2024
22 checks passed
@fwsGonzo fwsGonzo deleted the unbounded_32bit branch June 15, 2024 20:47
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.

None yet

1 participant