Skip to content

Enable sleep OCall and tweak default sleep#1625

Merged
achamayou merged 2 commits into
microsoft:masterfrom
achamayou:fix_enclave_backoff
Sep 18, 2020
Merged

Enable sleep OCall and tweak default sleep#1625
achamayou merged 2 commits into
microsoft:masterfrom
achamayou:fix_enclave_backoff

Conversation

@achamayou
Copy link
Copy Markdown
Member

#1100 previously enabled backoff in enclave after an interval to avoid spinning for extended periods of time.

Unfortunately the migration of internal Open Enclave OCalls to EDL caused this to break inadvertently, because we did not explicitly enable the nanosleep ocall. After testing with the existing value, CPU usage is still near 100%, so this is bumping it up to 50ms, which makes usage about 16% when idle.

The right solution here likely involves a CCF OCall with a condition variable on the host side, or something similar, to strike a better tradeoff between usage and latency on resume. This is a short term improvement over the current situation though.

@achamayou achamayou requested a review from a team as a code owner September 18, 2020 13:58
@ghost
Copy link
Copy Markdown

ghost commented Sep 18, 2020

fix_enclave_backoff@12865 aka 20200918.23 vs master ewma over 50 builds from 12251 to 12862
images

@achamayou achamayou merged commit 8091425 into microsoft:master Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants