-
Notifications
You must be signed in to change notification settings - Fork 34
Update memory region names #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
a721452 to
0b1cdf8
Compare
| pub const MM_STACK_START: u64 = MM_REGION_SIZE * 2; | ||
| /// Virtual address of the heap region | ||
| pub const MM_HEAP_START: u64 = MM_REGION_SIZE * 3; | ||
| /// Virtual address of the input region |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't "Input" be renamed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not rename it, because it is still the same. Should it be called MM_TX_INPUT_START?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Input" is kinda a useless name because it does not say from where to where, it is subjective depending on the perspective, like "left" and "right". Maybe MM_TX_AREA, MM_TX_INSTRUCTION_AREA and MM_TX_INSTRUCTION_DATA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then again, we probably want multiple instructions mapped in at once. So MM_TX_INSTRUCTION_DATA might not cut it either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then again, we probably want multiple instructions mapped in at once.
Even if we follow that path, the most important instruction for a program is the one being executed, so having that one in a predicted address that can be read without any other dependencies is preferable. The SDK could then access other instructions on demand.
src/ebpf.rs
Outdated
| pub const MM_INPUT_START: u64 = MM_REGION_SIZE * 4; | ||
| pub const MM_TX_AREA: u64 = MM_REGION_SIZE * 4; | ||
| /// Virtual address of the scratch pad area | ||
| pub const MM_SCRATCHPAD_AREA: u64 = MM_REGION_SIZE * 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just read the SIMD again, and I think I made a mistake calling this "scratchpad". We should stick with the current naming of this being "return-data".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated all names according to the latest version of the SIMD in 8ba1d93
Summary of changes