Remove legacy heap region from snapshot

Đang mở
#1,697 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
rust
Lĩnh vực
infrastructure

Hướng nghiên cứu

Bắt đầu bằng cách lần theo SandboxMemoryLayout::get_memory_size(), vùng ảnh snapshot và cơ chế xử lý fault hiện có của vùng stack. Thay đổi được hoàn tất khi các trang heap legacy không còn trong các snapshot và vùng VA out-of-image thay thế được unmapped theo mặc định nhưng sẽ được map tới zero khi xảy ra fault.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area/performance lifecycle/confirmed

For historical reasons, we have a "heap" region of memory in the snapshot, which is just a bunch of zero-initialised pages that bound the size of the heap. These are, in theory, never read from, only written to (upon which they will get CoW'd anyway), and have no real purpose existing, but bloat the size of the snapshot image. They are also all distinct physical pages when they are implicitly created in from_env (the space for them is included in SandboxMemoryLayout::get_memory_size(), so they are created when we make a memory buffer of that size), so the logic that deduplicates pages by GPA does not even work on them.

We should remove this region, and replace it with a VA region outside the snapshot image region that is unmapped by default, and maps to zero when a fault hits it. We can essentially reuse the logic from the stack region for this.

Ngôn ngữ chính
Rust
Star
4.7k
Fork
210
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
43

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của hyperlight-dev/hyperlight

Tất cả issue của hyperlight-dev/hyperlight

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.