Re: [PATCH v5 6/7] sched/deadline: Deferrable dl server

From: Steven Rostedt
Date: Tue Nov 07 2023 - 15:07:53 EST


On Tue, 7 Nov 2023 14:32:16 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> I'll also test this without any of the patches first.

And it still happens, and I now I know why :-)

Duh! The program is "migrate" which stress tests how RT tasks migrate
between CPUs when there's more RT tasks running that CPUs to run them on.

This is the push/pull logic in action!

migrate-958 4d..2. 266.971936: sched_switch: migrate:958 [89] S ==> userspin:939 [120]

Task 958 of priority 89 (lower is higher) goes to sleep. There's no RT
tasks on CPU 4 to run, so it runs userspin.

migrate-953 2d.h2. 266.971938: sched_waking: comm=migrate pid=957 prio=90 target_cpu=002
migrate-953 2d..2. 266.971944: sched_switch: migrate:953 [94] R ==> migrate:957 [90]

On CPU 2, task 957 (prio 90) preempts 953 (prio 94).

userspin-939 4d..2. 266.971953: sched_switch: userspin:939 [120] R ==> migrate:953 [94]

Now 953 migrates over to CPU 4 as it's currently the CPU running the lowest
priority task.

There's other cases where another CPU was simply overloaded, and when the
RT task on the CPU with userspin went to sleep, it triggered an IPI to the
overloaded CPU to tell it to push it over here.

All is good. Nothing to see here ;-)

-- Steve