Skip to content

Conversation

@ValentaTomas
Copy link
Member

@ValentaTomas ValentaTomas commented Aug 7, 2025

  • Extract low level UFFD handler to a separate package
  • Remove unused struct
  • Improve uffd tests (ensure they are not flaky)
    • Add the 2M hugpages tests

Note

Extracts low-level UFFD into a new userfaultfd package, replaces mapping with memory map API, wires into orchestrator, and adds robust 4K/2MB tests; CI enables UFFD and hugepages.

  • Orchestrator UFFD refactor:
    • Move low-level handling to new userfaultfd package (Serve, configureApi, Register, copy, Close).
    • Replace mapping with memory package (MemfileMap, MemoryMap.GetOffset); update Firecracker mapping and JSON parsing.
    • Update uffd integration to use userfaultfd.NewUserfaultfdFromFd(...).Serve(...); remove TrackAndReturnNil.
    • Simplify UFFD constants/APIs (remove write-protect helpers; adjust pagefault address/dst handling).
  • Tests:
    • Add userfaultfd tests covering 4K and 2MB hugepages; ensure non-flaky behavior.
    • Introduce testutils helpers (NewPageMmap, ContiguousMap, random data, content slicer) and utils.MapKeys.
  • CI:
    • Workflow enables unprivileged userfaultfd and mounts hugepages before tests.
  • Misc:
    • Minor signature tweak in MaskTemplate.Close.

Written by Cursor Bugbot for commit dcea5f1. This will update automatically on new commits. Configure here.

@ValentaTomas ValentaTomas self-assigned this Aug 7, 2025
@ValentaTomas ValentaTomas added the improvement Improvement for current functionality label Aug 7, 2025
@ValentaTomas ValentaTomas changed the title Extract low level uffd handler to a separate package Extract low level UFFD handler to a separate package Aug 7, 2025
@ValentaTomas ValentaTomas removed their assignment Sep 21, 2025
@ValentaTomas ValentaTomas marked this pull request as ready for review October 4, 2025 00:13
@ValentaTomas
Copy link
Member Author

I'll improve the tests a little, but the rest should be ready.

@ValentaTomas
Copy link
Member Author

Included in #1385, very hard to merge separately.

@ValentaTomas ValentaTomas deleted the uffd-extract branch October 21, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement for current functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants