From 83e44b4f5d02cfd5aad7d03ddb075f4b94bf35b9 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 11 Jun 2023 23:07:36 +0300 Subject: add some clarifications to rpc stack stuff --- include/kmi/conf.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/kmi/conf.h b/include/kmi/conf.h index 84b9f06..8e33a5f 100644 --- a/include/kmi/conf.h +++ b/include/kmi/conf.h @@ -24,6 +24,13 @@ extern size_t __thread_stack_size; /** * Provides access to the runtime global parameter. * Must be at most RPC_STACK_TOP - RPC_STACK_BASE. + * Essentially, each thread gets allocated this many bytes of total stack space + * that will be used during thread migrations. Each migration instance may at + * most take up __rpc_stack_size bytes, and during a thread migration the + * currently available free stack space is checked. + * + * Previous instances are unmapped, making them unaccessible to the current + * instance. * * \see __thread_stack_size. * \global @@ -35,18 +42,8 @@ extern size_t __call_stack_size; * Provides access to the runtime global parameter. This sets the maximum size * a single rpc stack instance can be. * - * Must be at most a fourth of \ref __call_stack_size? - * (that way we can maybe pretty quickly check that we're running out of memory - * for stack stuff and can return an error about it) - * * \global */ extern size_t __rpc_stack_size; -/** - * Convenience macro for requirement of ratio between \ref __rpc_stack_size and - * \ref __call_stack_size. - */ -#define RPC_STACK_RATIO 4 - #endif /* KMI_CONF_H */ -- cgit v1.3