Skip to content

Look at mapping the interpreter's code in huge pages #20

Closed

Description

@maximecb

It looks as though the CPU has two pieces of iTLB hardware. One for huge pages and one for small pages. If that's true, we could benefit from having the interpreter use the huge pages, and the JIT use the small pages all for itself. This is a patch that we could also potentially upstream. It could benefit CRuby and MJIT as well.

See Intel doc and Intel sample implementation.

Activity

  1. changed the title [-]Map the interpreter's code in huge pages[/-] [+]Look at mapping the interpreter's code in huge pages[/+] on Jan 11, 2021
  2. maximecb commented on Jan 18, 2021

    @maximecb
    Author

    @XrXr Since remapping the text segment is complicated. I think it make sense to focus on maybe just trying to mmap the microjit code into huge pages and test the performance for now.

    We could leave text in normal pages, and have the JIT code in the huge pages, ideally allowing us to use both TLBs at once, an avoiding a complex, less portable solution.

    If you try this, I would suggest using the code from the microjit-v1 branch, since the current branch is in flux and not ready to be benchmarked right now.

  3. maximecb commented on Jan 21, 2021

    @maximecb
    Author

    Closing this for now since it doesn't look like mapping the text segment in huge pages is worth the added complexity.

    Might be worth revisiting mapping the JITted code in huge pages (simpler) once MicroJIT V2 is further along.

  4. added a commit that references this issue on Jun 2, 2021
  5. added a commit that references this issue on Nov 24, 2021
  6. added a commit that references this issue on Nov 30, 2024
  7. added a commit that references this issue on Dec 19, 2025
  8. added a commit that references this issue on Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions