Skip to content
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

generic page pool for MMU-based systems #29526

Closed
andrewboie opened this issue Oct 24, 2020 · 1 comment
Closed

generic page pool for MMU-based systems #29526

andrewboie opened this issue Oct 24, 2020 · 1 comment
Assignees
Labels
area: Memory Management area: Memory Protection Enhancement Changes/Updates/Additions to existing features

Comments

@andrewboie
Copy link
Contributor

andrewboie commented Oct 24, 2020

Is your enhancement proposal related to a problem? Please describe.
We have some use-cases for a page pool:

  1. Pages to allocate MMU data structures
  2. Pages for anonymous memory mappings
  3. Pages to increase the size of the system heap arena with sbrk() which is really just a special case of This is a test commit #2

Right now on x86 we have:

  • a separate pool for MMU paging structure pages which has to be tuned in a cumbersome way; the number you need depends on how many active memory domains are required and how much memory has been mapped besides system RAM.
  • For the newlib libc, we do not memory map the heap. We have a fixed sized physical arena from the _end symbol to the bounds of RAM. sbrk() calls just increment a pointer within this area. No attempt is made not to crash into data structures populated by firmware and we are not using available memory in the first megabyte.
  • No support for anonymous memory mappings yet

Describe the solution you'd like
A page pool to draw page frames from for all the above use-cases.
All these pages are either getting memory mapped into the virtual address space, or are used for paging structures, there is no need for contiguous physical regions larger than a page.
Will need to play nice with demand paging, with ability to anonymously map more memory even when all RAM frames are in use.

@dcpleung
Copy link
Member

Already done. (commit b011771)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Memory Management area: Memory Protection Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

2 participants