Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Defence-in-depth VM privileges: TDP_VMPRIV, sync dispatch for swap objects, ARC pageout throttle

Aperta
#219 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

Start with the listed FreeBSD locations, include/os/freebsd/spl/sys/kmem.h:49 and module/os/freebsd/zfs/arc_os.c:124, then trace the curproc == pageproc sites in sys/vm and swap-object dispatch. The issue describes several coordinated kernel changes and depends on nextbsd/nextbsd-kernel#214; completion includes the stated acceptance criterion that a TDP_VMPRIV thread allocates at VM_ALLOC_SYSTEM and waits pageproc-style.

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

Descrizione

area:vm enhancement

Summary

The cheap parts of the memory-reserve route, taken as defence in depth only -- not as the correctness argument. The bypass design (K1, Z3) is what makes swap safe.

Why only the cheap parts

illumos built the full reserve design (NOMEMWAIT(), KM_PUSHPAGE, a ZFS-sized pageout_reserve, the ARC throttle) and still ships pageout_deadman, which panics after 90 s of stuck pageout. On FreeBSD it is weaker again:

  • KM_PUSHPAGE is #defined to M_WAITOK (include/os/freebsd/spl/sys/kmem.h:49)
  • arc_memory_throttle() is return (0); (module/os/freebsd/zfs/arc_os.c:124)

Design

  • TDP_VMPRIV bit in td_pflags plus a vm_thread_privileged() inline (curproc == pageproc || (td->td_pflags & TDP_VMPRIV)) at the ~10 existing curproc == pageproc sites (~300-500 LOC in sys/vm)
  • synchronous dispatch for swap objects (no taskq hop)
  • the arc_memory_throttle pageout branch, as Linux and illumos have

Acceptance

  • a thread marked TDP_VMPRIV allocates at VM_ALLOC_SYSTEM and waits pageproc-style

K8 in epic nextbsd/nextbsd#468 (E14 VM, paging & filesystems). Depends on: nextbsd/nextbsd-kernel#214 (K1).

Draft: https://pkgdemon.github.io/nextbsd-e14-tickets.html#k8

Lingua principale
C
Stelle
12
Fork
3
Merge medio
7h 1m
PR unite (30g)
7

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 nextbsd/nextbsd-kernel

Tutte le issue di nextbsd/nextbsd-kernel

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.