New Linux System Call Proposed To Let User-Space Pin Themselves To Specific CPU Cores
A "pin_on_cpu" system call has been proposed for the Linux kernel as a new means of letting user-space threads pin themselves to specific CPU cores.
User-space processes requesting to be run on specific CPU cores can already e done by the likes of Linux's sched_setaffinity to get/set the CPU affinity mask while pin_on_cpu would be a new and simpler way. The current calls also run into issues around CPU hot-plugging, as explained further in the RFC mailing list post.
Setting the CPU core to run on with the proposed pin_on_cpu system call would still require that the specific CPU be part of the allowed CPU mask. The pin_on_cpu proposal is being made as part of furthering along the Restartable Sequences (RSEQ) support. But obviously there are plenty of other use-cases for a simple means of letting user-space processes pin to specific CPU cores themselves.
More details on this CPU thread pinning system call proposal via the kernel mailing list while waiting to see if it takes off for flight or not.
User-space processes requesting to be run on specific CPU cores can already e done by the likes of Linux's sched_setaffinity to get/set the CPU affinity mask while pin_on_cpu would be a new and simpler way. The current calls also run into issues around CPU hot-plugging, as explained further in the RFC mailing list post.
Setting the CPU core to run on with the proposed pin_on_cpu system call would still require that the specific CPU be part of the allowed CPU mask. The pin_on_cpu proposal is being made as part of furthering along the Restartable Sequences (RSEQ) support. But obviously there are plenty of other use-cases for a simple means of letting user-space processes pin to specific CPU cores themselves.
More details on this CPU thread pinning system call proposal via the kernel mailing list while waiting to see if it takes off for flight or not.
31 Comments