[00/10] Fair scheduling deadline server fixes

Message ID 20240216183108.1564958-1-joel@joelfernandes.org
Headers
Series Fair scheduling deadline server fixes |

Message

Joel Fernandes Feb. 16, 2024, 6:30 p.m. UTC
  Hello,
The deadline server [1] allows RT tasks to run on a system safely, while not
wasting CPU that RT tasks may not get on an idle system due to RT throttling.

Here are patches that are mostly fixes that we found while testing out the
deadline server [1] for ChromeOS.

The main fix is to core scheduling, but we found several other issues.

These patches are based on Daniel's preview branch for v6:
https://git.kernel.org/pub/scm/linux/kernel/git/bristot/linux.git/?h=dl_server_v6

Daniel mentioned he is working on fixing the fair server interface issues [2].
These patches apply cleanly on his preview version.

[1] https://lore.kernel.org/all/cover.1699095159.git.bristot@kernel.org/
[2] https://lore.kernel.org/all/091ca2ea-202d-4685-92ea-529186a94f0a@kernel.org/

Joel Fernandes (Google) (8):
  sched/core: Add clearing of ->dl_server in put_prev_task_balance()
  sched/core: Fix priority checking for DL server picks
  sched/core: Fix picking of tasks for core scheduling with DL server
  sched/debug: Use unsigned long for cpu variable to prevent cast errors
  selftests/sched: Add a test to verify that DL server works with core
    scheduling
  selftests/sched: Migrate cs_prctl_test to kselfttest
  admin-guide/hw-vuln: Correct prctl() argument description
  sched: Fix build error in "sched/rt: Remove default bandwidth control"

Suleiman Souhlal (1):
  sched: server: Don't start hrtick for DL server tasks

Youssef Esmat (1):
  sched/core: Clear prev->dl_server in CFS pick fast path

 .../admin-guide/hw-vuln/core-scheduling.rst   |   4 +-
 include/linux/sched.h                         |   3 +-
 kernel/sched/core.c                           |  46 +++-
 kernel/sched/deadline.c                       |  34 ++-
 kernel/sched/debug.c                          |   4 +-
 kernel/sched/fair.c                           |  22 +-
 kernel/sched/rt.c                             |   2 +
 kernel/sched/sched.h                          |   3 +-
 tools/testing/selftests/sched/Makefile        |  17 +-
 tools/testing/selftests/sched/common.c        |  24 ++
 tools/testing/selftests/sched/common.h        |   8 +
 .../selftests/sched/cs_dlserver_test.c        | 254 ++++++++++++++++++
 tools/testing/selftests/sched/cs_prctl_test.c |  74 ++---
 13 files changed, 424 insertions(+), 71 deletions(-)
 create mode 100644 tools/testing/selftests/sched/common.c
 create mode 100644 tools/testing/selftests/sched/common.h
 create mode 100644 tools/testing/selftests/sched/cs_dlserver_test.c