Skip to content

Conversation

eldering
Copy link
Member

@eldering eldering commented Sep 3, 2025

Check CPU pinning only on online CPUs in runguard and add a test source to make sure that submissions get scheduled on a single CPU. And some small tweaks/cleanups.

@eldering eldering requested a review from meisterT September 3, 2025 12:22
// Wait for all our children
do {
pid_t pid;
int status;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation seems inconsistent

int status;
pid = wait(&status);
if ( pid==-1 ) {
if ( errno==ECHILD) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add before )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(or remove spaces around conditions alltogether)

Ideally we should check that the submission is pinned to the CPU
core that we set, but that information is not as easily available.
Those should be equivalent, just have different type.
When you try to pin a cgroup to a CPU that is offline, then
the call to cgroups works fine, but then the Linux kernel just
schedules the processes in that cgroup on any available CPU.

That's definitely not what we want, so explicitly check and
error out when the requested CPUs are not online.
@eldering eldering added this pull request to the merge queue Sep 3, 2025
Merged via the queue into main with commit 9a40bbe Sep 3, 2025
42 checks passed
@eldering eldering deleted the check-cpu-pinning branch September 3, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants