aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-06-05 20:31:44 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-06-05 20:31:44 +0300
commit67831847a3fb211784e1d143d472fd86c0e5fab8 (patch)
treec3eefca9b8efeb1b3bc1c2a71016f23840fd09ad /arch/riscv64
parentabb11558ee2a2943023f2e9727976a8adace3bc8 (diff)
downloadkmi-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-xarch/riscv64/conf/initbin3648 -> 4128 bytes
-rw-r--r--arch/riscv64/conf/init.c4
-rw-r--r--arch/riscv64/conf/initrdbin4096 -> 4608 bytes
3 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv64/conf/init b/arch/riscv64/conf/init
index 76de753..c372029 100755
--- a/arch/riscv64/conf/init
+++ b/arch/riscv64/conf/init
Binary files differ
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
index e4d76a2..a489f3a 100644
--- a/arch/riscv64/conf/initrd
+++ b/arch/riscv64/conf/initrd
Binary files differ