rust-osdev / rust-osdev/x86_64

Add `Mapper` methods to map `PageRange` to `PhysFrameRange`

Open
#192 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
940
Forks
157
Avg merge
1d 10h
Merged PRs (30d)
3

Description

Hey, first I want to say this crate is great. It removes a lot of pain from starting with OS dev.

I ran into a minor annoyance: mapping a large range of memory is pretty slow. In my code I'm trying to identity map all the machine's physical memory. It takes a few seconds in a release build and quite a bit longer in a debug build. I suspect a lot of this is from traversing the same tables over and over when repeatedly calling map_to.

I think methods for mapping entire ranges could be faster: instead of a loop that traverses down all levels each iteration, there could be loops at each level.

Is this a reasonable request? I'm interested in writing up a PR if it's something you'd accept.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing Mapper::map_to behavior and the PageRange and PhysFrameRange APIs mentioned in the request. Determine how range mapping should differ from repeatedly mapping individual pages, then verify that the new methods cover the requested physical-memory use case and improve the reported traversal cost.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.