Remove legacy heap region from snapshot

Aperta
#1,697 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust

Direzione di ricerca

Inizia tracciando SandboxMemoryLayout::get_memory_size(), la regione dell’immagine dello snapshot e la gestione esistente dei fault della regione dello stack. La modifica è completa quando le pagine dell’heap legacy sono assenti dagli snapshot e la regione VA out-of-image sostitutiva è non mappata per impostazione predefinita, ma viene mappata a zero in caso di fault.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
4.7k
Fork
210
Merge medio
1g 12h
PR unite (30g)
43

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hyperlight-dev/hyperlight

Tutte le issue di hyperlight-dev/hyperlight

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.