microsoft / microsoft/demikernel
Allow demi_sgaalloc calls larger than 64KB
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
Context
The demi_sgaalloc API uses the LibOS's sgaalloc provider to allocate memory. Most (all?) LibOSes currently use MemoryRuntime to handle these sgaalloc calls. This implementation will fail allocations where the size parameter is greater than u16::MAX, as the code is not currently situated to allocate more than one DemiBuffer (the DemiBuffer length field is 16 bytes).
This limitation potentially requires clients to juggle multiple independent buffers, which could unnecessarily complicate client-side logic.
See also #88 (outdated)
Proposed Solution
Update MemoryRuntime's sgaalloc implementation to chain buffers to reach the desired allocation iota. Useful support will subsequently require changes to each LibOS to accept chained DemiBuffers.
Alternative Solutions
Allocation sizes could be limited to 16 bits as a formal contract, but this seems very artificially limiting versus other software.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate MemoryRuntime's sgaalloc implementation and the DemiBuffer length definition first. Then inspect how each LibOS consumes sgaalloc results and determine the changes needed for chained buffers. Done means allocations larger than u16::MAX can be represented and accepted by the relevant LibOSes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100