nanovms / nanos

A kernel designed to run one and only one application in a virtualized environment
https://nanos.org
Apache License 2.0
2.58k stars 133 forks source link

scheduler: add support for CPU affinity (thread pinning) #2024

Closed francescolavra closed 2 months ago

francescolavra commented 3 months ago

This change set enhances the scheduler so that it honors the CPU affinity of user threads (set via the sched_setaffinity syscall). In addition, it amends the CircleCI configuration so that automated tests are run on 2-vCPU instances, in order to increase test coverage of SMP-related kernel code. This increased test coverage revealed a few issues in the RISC-V-specific code and in the Unix code (Unix domain sockets, poll/select, and robust futexes), which have been fixed as part of this change set.

francescolavra commented 3 months ago

I added 2 commits that fix SMP-related issues found in the poll/select implementation and the robust futex handling logic.