diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-11-13 07:28:52 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-11-13 07:28:52 +0200 |
| commit | b36e3b83b402ee054c319f0472b16a2bd64bba7e (patch) | |
| tree | 91a1eff471354c2c2220b0f31c962d53595b43c4 /arch/riscv64/config.h | |
| parent | 6d3586aa42409fc720e30856cb5df5284329463a (diff) | |
| download | kmi-b36e3b83b402ee054c319f0472b16a2bd64bba7e.tar.gz kmi-b36e3b83b402ee054c319f0472b16a2bd64bba7e.zip | |
~1.3M ipc requests
+ The secret is using gravestones. I'll have to write up full
documentation for the feature but essentially riscv lets us encode
whatever we want into page table entries, as long as they're not
active. We use this to encode highest user address that is not a zero,
in that all entries in the top level are either active or gravestones.
When an active entry is removed, it is either a gravestone (if there
are other active entries above it) or it starts a cascade of removing
entries that have been previously removed
Slight runtime overhead to page mapping, pretty major advantage in rpc
calls. Feature will need to be tested more thorougly, and the init
program is sort of a best scenario with just one top level userspace
page table entry active at a time, leading to incredibly fast context
switches.
Current implementation limits a process' max virtual memory to 248 GiB
(in Sv39), but I don't think the missing 8 GiB is that big of a deal.
Diffstat (limited to 'arch/riscv64/config.h')
| -rw-r--r-- | arch/riscv64/config.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv64/config.h b/arch/riscv64/config.h index 857f885..b96dc3e 100644 --- a/arch/riscv64/config.h +++ b/arch/riscv64/config.h @@ -68,13 +68,13 @@ #define KSTART_PAGE 256UL /** The RPC stack page. */ -#define CSTACK_PAGE 255UL +#define CSTACK_PAGE 248UL /** User virtual memory space start. */ #define UVMEM_START (SZ_4K) /** User virtual memory space end. */ -#define UVMEM_END (SZ_256G - SZ_1G) +#define UVMEM_END (SZ_256G - SZ_8G) /** RPC stack top. */ #define RPC_STACK_TOP (UVMEM_END + SZ_1G) |
