diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-06-05 20:31:44 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-06-05 20:31:44 +0300 |
| commit | 67831847a3fb211784e1d143d472fd86c0e5fab8 (patch) | |
| tree | c3eefca9b8efeb1b3bc1c2a71016f23840fd09ad /arch/riscv64 | |
| parent | abb11558ee2a2943023f2e9727976a8adace3bc8 (diff) | |
| download | kmi-67831847a3fb211784e1d143d472fd86c0e5fab8.tar.gz kmi-67831847a3fb211784e1d143d472fd86c0e5fab8.zip | |
give compiler more room to optimize rpc invocation
+ Try to write arguments to memory as fast as possible to free up some
registers that the compiler can then play with.
Qemu runs ~1 700 000 rpc's per second, visionfive2 @1GHz (I think) ~800 000.
Diffstat (limited to 'arch/riscv64')
| -rwxr-xr-x | arch/riscv64/conf/init | bin | 3648 -> 4128 bytes | |||
| -rw-r--r-- | arch/riscv64/conf/init.c | 4 | ||||
| -rw-r--r-- | arch/riscv64/conf/initrd | bin | 4096 -> 4608 bytes |
3 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv64/conf/init b/arch/riscv64/conf/init Binary files differindex 76de753..c372029 100755 --- a/arch/riscv64/conf/init +++ b/arch/riscv64/conf/init diff --git a/arch/riscv64/conf/init.c b/arch/riscv64/conf/init.c index 8177992..001d5eb 100644 --- a/arch/riscv64/conf/init.c +++ b/arch/riscv64/conf/init.c @@ -268,8 +268,6 @@ void _start() uint64_t n = 0, i, start, cn, cstart, cend; start = i = sys_ticks(); - print_value("Start ticks", start); - csr_read(CSR_CYCLE, cstart); while (i < start + second) { i = sys_ticks(); @@ -277,6 +275,7 @@ void _start() } csr_read(CSR_CYCLE, cend); + print_value("Start ticks", start); print_value("End ticks", i); print_value("Syscalls per second", n); print_value("Executed cycles per second", cend - cstart); @@ -326,6 +325,7 @@ void _start() puts("Checking shared memory\n"); struct ipc_args r = sys_ipc_req(1, 1, 0, 0, 0); rw_buf = (char *)r.a1; + rw_buf_size = (size_t)r.a2; print_value("Shared memory ptr", (uintptr_t)rw_buf); print_value("Shared memory size", rw_buf_size); diff --git a/arch/riscv64/conf/initrd b/arch/riscv64/conf/initrd Binary files differindex e4d76a2..a489f3a 100644 --- a/arch/riscv64/conf/initrd +++ b/arch/riscv64/conf/initrd |
