Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
scx: Validate that cpu callbacks can be sleepable
Browse files Browse the repository at this point in the history
Now that ops.cpu_online() and ops.cpu_offline() can be sleepable,
let's update their test BPF progs to be sleepable to validate.

Signed-off-by: David Vernet <void@manifault.com>
  • Loading branch information
Byte-Lab committed Jun 6, 2024
1 parent aea0a79 commit af0765b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/selftests/sched_ext/hotplug.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ static void exit_from_hotplug(s32 cpu, bool onlining)
onlining ? "online" : "offline");
}

void BPF_STRUCT_OPS(hotplug_cpu_online, s32 cpu)
void BPF_STRUCT_OPS_SLEEPABLE(hotplug_cpu_online, s32 cpu)
{
exit_from_hotplug(cpu, true);
}

void BPF_STRUCT_OPS(hotplug_cpu_offline, s32 cpu)
void BPF_STRUCT_OPS_SLEEPABLE(hotplug_cpu_offline, s32 cpu)
{
exit_from_hotplug(cpu, false);
}
Expand Down

0 comments on commit af0765b

Please sign in to comment.