[mm_supv]: Replace the MM user core bump pool allocator with the DXE allocator logic or linked_list_allocator
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- embedded-iot
Research direction
Start with patina_mm_user_core/src/pool_allocator.rs and its existing allocator tests, then compare the FixedSizeBlockAllocator in patina_dxe_core/src/allocator and the linked_list_allocator option. Choose an approach that reuses freed memory, returns empty pages through the existing PageAllocatorBackend, and works under Ring 3 constraints; finish when the existing pool allocator tests pass.
Written by the indexing model from the issue text.
Description
Feature Overview
The MM user core's global allocator (PoolAllocator in patina_mm_user_core/src/pool_allocator.rs) is a bump allocator. It takes pages from the supervisor through the AllocPage/FreePage syscalls and hands out pieces from the current block. A block's pages go back to the supervisor only when every allocation in it is freed. Space freed in the middle of a block is never reused, so a long-running MM runtime with mixed allocation lifetimes can keep requesting more pages. The DXE core already has a general-purpose heap (FixedSizeBlockAllocator in patina_dxe_core/src/allocator).
https://github.com/OpenDevicePartnership/patina/pull/1875#discussion_r4556987130
Solution Overview
Compare two options, keeping the existing PageAllocatorBackend (syscall page source) underneath: (1) reuse the DXE core's fixed-size block allocator logic, moved into a shared crate if needed, or (2) use the linked_list_allocator crate, which would need a cargo-deny review. Pick the one that reuses freed memory, returns empty pages to the supervisor, and fits the Ring 3 constraints. Keep the existing pool allocator tests as the acceptance bar.
Alternatives Considered
No response
Urgency
Low
Are you going to implement the feature request?
I will implement the feature
Do you need maintainer feedback?
No maintainer feedback needed
Anything else?
No response
- Dominant language
- Rust
- Stars
- 568
- Forks
- 63
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 60
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from OpenDevicePartnership/patina
-
state:needs-owner state:needs-triage type:documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenDevicePartnership/patina#1987 ·
Maintainers usually reply within 1 day
-
state:backlog state:needs-triage type:feature-request urgency:medium
Difficulty 5/5 Over a week Newbie friendliness 28/100
OpenDevicePartnership/patina#2039 ·
Maintainers usually reply within 1 day
-
Potential Major Update: Drop `Deref` from `Protocol<P>`Possibly taken @makubacki claimed this 7 days ago. Open
OpenDevicePartnership/patina#2036 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Feature]: Enforce service thread safety through automatic Send and Sync implementationsPossibly taken @Javagedes claimed this 8 days ago. Openstate:needs-triage type:feature-request urgency:medium
OpenDevicePartnership/patina#2027 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
OpenDevicePartnership/patina#2024 ·
Maintainers usually reply within 1 day
All issues in OpenDevicePartnership/patina
Similar issues
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
can1357/oh-my-pi#21349 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
erkamyaman/rea-games#246 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aaif-goose/goose#13970 ·
Maintainers usually reply within 1 day
-
comp-documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ClickHouse/ClickHouse#136277 ·
Maintainers usually reply within 1 day