mystikos
mystikos copied to clipboard
perf: optimize kstack size
not all kernel stacks need large stacks. we can determine this from the syscall ID... for instance verify report is very deep, but a number of others like getpid are very small. we can have maybe 2 different stack sizes and if a syscall needs a large stack it gets 64k, otherwise we can probably use as small as 16k or less.
@paulcallen Is it a good idea to measure the memory requirement for each syscall statically and then map each one to a different stack size (2 or more)?
call stacks that dont jump out of the enclave can be significantly smaller. When running on coffeelake machines which have a small memory availability having all stacks be the larger size can really affect performance. This is especially true with languages like .NET.