Implement multi-core emulation
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c
- Área
- backend, operating-systems
Línea de trabajo
Start by reading the linked execution paths in main.c:2000-2025 and main.c:1713-1726, then review issue #145, which the issue says must be resolved first. The work spans hart execution, shared memory, interrupts, devices, and GDB, with smoke tests and performance comparisons; completion means parallel multi-hart execution works while single-hart mode remains performant.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Implement multi-core emulation
Support for virtio-gpu introduced a multithreaded model to semu, while the current SMP implementation uses coroutine-based cooperative multitasking. Guest Linux can see multiple harts, but on the host, these harts still take turns running in a single emulator thread (see main.c:2000-2025 and main.c:1713-1726).
Since we have only recently introduced multithreading, now would be a good time to design multi-core emulation. This would allow multiple harts to run in parallel on the host, using multiple processor cores to execute parallel guest workloads while preserving performance in single-hart mode. It would also make semu better suited to testing Linux's multiprocessor behavior and programs that require communication across harts.
The work would broadly include:
- Allow active harts to run on separate host threads, distinguish each hart's own state from state shared by the entire VM, and retain the single-hart execution model.
- Handle shared RAM access,
AMO,LR/SC, andFENCEso that parallel execution conforms to RISC-V memory semantics. - Adapt
HSM,IPI, andRFENCEto handle starting and stopping harts, notifications across harts, and remote synchronization. Interrupts, timers, andWFIwait and wakeup behavior also need to accommodate parallel execution. - Coordinate all harts and devices when pausing, resetting, or shutting down the VM, and allow GDB to inspect each hart, stop execution, and single-step.
- Establish basic smoke tests covering multi-hart boot, parallel workloads, notifications across harts, sleep and wakeup, and shutdown, and compare single-hart and multi-hart performance.
However, the current code architecture makes these changes difficult to implement, as discussed in #145. I think we can start implementing multi-core emulation once #145 is resolved.
- Lenguaje dominante
- C
- Estrellas
- 316
- Forks
- 76
- Merge medio
- 7 h 1 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sysprog21/semu
-
Implement virtio-gpu 3DAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Provide a Common Layer for semuAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Implement VirtIO PCI transport layerQuizá libre de nuevo @shengwen-tw la tomó hace 527 días y no hay ningún pull request abierto. Abierto
Todos los issues de sysprog21/semu
Issues similares
-
issue: bug report
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
BasedHardware/omi#26486 ·
Los mantenedores suelen responder en 1 día
-
The LLVM object can build before collection_config.h is generatedPosiblemente ocupada @Vonng la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
aws/pgcollection#51 ·
-
area/docdb kind/failing-test priority/medium status/awaiting-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
yugabyte/yugabyte-db#39462 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
libreswan/libreswan#3185 · 1 comentario ·
Los mantenedores suelen responder en 1 día