Skip to content

RFC sched: SCHED_DEADLINE v4

Juri Lelli linux-rt-users lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest16 patches 112 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16sched: add sched_class->task_dead.include/linux/sched.h kernel/sched.c+4 -02 replies
2/16sched: add extended scheduling interface.arch/arm/include/asm/unistd.h arch/arm/kernel/calls.S arch/x86/ia32/ia32entry.S +6 more+186 -40 replies
3/16sched: SCHED_DEADLINE data structures.include/linux/sched.h kernel/hrtimer.c kernel/sched.c+132 -1114 replies
4/16sched: SCHED_DEADLINE SMP-related data structures.include/linux/sched.h kernel/sched.c+50 -10 replies
5/16sched: SCHED_DEADLINE policy implementation.include/linux/sched.h kernel/fork.c kernel/sched.c +3 more+719 -1240 replies
6/16sched: SCHED_DEADLINE push and pull logickernel/sched_dl.c kernel/sched_rt.c+889 -2529 replies
7/16sched: SCHED_DEADLINE avg_update accounting.kernel/sched_dl.c+2 -00 replies
8/16sched: add period support for -deadline tasks.include/linux/sched.h kernel/sched.c kernel/sched_dl.c+20 -65 replies
9/16sched: add schedstats for -deadline tasks.include/linux/sched.h kernel/sched.c kernel/sched_debug.c +1 more+103 -00 replies
10/16sched: add resource limits for -deadline tasks.include/asm-generic/resource.h kernel/sched.c+31 -14 replies
11/16sched: add latency tracing for -deadline tasks.kernel/trace/trace_sched_wakeup.c kernel/trace/trace_selftest.c+58 -135 replies
12/16rtmutex: turn the plist into an rb-tree.include/linux/init_task.h include/linux/rtmutex.h include/linux/sched.h +5 more+157 -674 replies
13/16sched: drafted deadline inheritance logic.include/linux/sched.h kernel/fork.c kernel/rtmutex.c +2 more+102 -323 replies
14/16sched: add bandwidth management for sched_dl.include/linux/sched.h kernel/sched.c kernel/sched_dl.c +1 more+512 -250 replies
15/16sched: speed up -dl pushes with a push-heap.kernel/Makefile kernel/sched.c kernel/sched_cpudl.c +2 more+261 -390 replies
16/16sched: add sched_dl documentation.Documentation/scheduler/sched-deadline.txt+147 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 00/16] sched: SCHED_DEADLINE v4

Hello everyone,

This is the take 4 for the SCHED_DEADLINE patchset.

Just to recap, the patchset introduces a new deadline based real-time task scheduling policy --called SCHED_DEADLINE-- with bandwidth isolation (aka "resource reservation") capabilities. It now supports global/clustered multiprocessor scheduling through dynamic task migrations.

From the previous releases[1]:
- all the comments and the fixes coming from the reviews we got have

    been considered and applied;

- better handling of rq selection for dynamic task migration, by means of a cpupri equivalent for -deadline tasks (cpudl). The mechanism is simple and straightforward, but showed nice performance figures[2].
- this time we sit on top of PREEMPT_RT (3.2.13-rt23); we continue to aim at mainline inclusion, but we also see -rt folks as immediate and interested users.

Still missing/incomplete:
- (c)group based bandwidth management, and maybe scheduling. It seems some more discussion on what precisely we want is *really* needed for this point;
- bandwidth inheritance (to replace deadline/priority inheritance). What's in the patchset is just very few more than a simple placeholder. More discussion on the right way to go is needed here. Some work has already been done, but it is still not ready for submission.

The development is taking place at:
https://github.com/jlelli/sched-deadline

Check the repositories frequently if you're interested, and feel free to e-mail me for any issue you run into.

Furthermore, we developed an application that you can use to test this patchset:
https://github.com/gbagnoli/rt-app

We also set up a development mailing list: linux-dl[3]. You can subscribe from here:
http://feanor.sssup.it/mailman/listinfo/linux-dl
or via e-mail (send a message to [email protected] with just the word `help' as subject or in the body to receive info).

As already discussed we are planning to merge this work with the EDF throttling patches [https://lkml.org/lkml/2010/2/23/239] but we still are in the preliminary phases of the merge and we intend to use the feedback to this post to help us decide on the direction it should take.

As said, patchset is on top of PREEMPT_RT (as of today). However, Insop Song (from Ericsson) is maintaining a parallel branch for the current tip/master (https://github.com/insop/sched-deadline2). Ericsson is in fact evaluating the use of SCHED_DEADLINE for CPE (Customer Premise Equipment) devices in order to reserve CPU bandwidth to processes.

The code was being jointly developed by ReTiS Lab (http://retis.sssup.it)
and Evidence S.r.l (http://www.evidence.eu.com) in the context of the ACTORS EU-funded project (http://www.actors-project.eu). It is now also supported by the S(o)OS EU-funded project (http://www.soos-project.eu/).
It has also some users, both in academic and applied research. Even if our last release dates back almost a year we continued to get feedback from Ericsson (see above), Wind River, Porto (ISEP), Trento and Malardalen universities :-).

As usual, any kind of feedback is welcome and appreciated.

Thanks in advice and regards,

- Juri

[1] http://lwn.net/Articles/376502, http://lwn.net/Articles/353797,

    http://lwn.net/Articles/412410

[2] http://retis.sssup.it/~jlelli/papers/Ospert11Lelli.pdf
[3] from the first linux-dl message:
-linux-dl should become the place where discussions about real-time
deadline scheduling on Linux take place (not only SCHED_DEADLINE). We felt the lack of a place where we can keep in touch with each other; we are all working on the same things, but probably from different viewpoints, and this is surely a point of strength. Anyway, our efforts need to be organized in some way, or at least it is important to know on what everyone is currently working as to not end up with "duplicate-efforts".-

Dario Faggioli (10):
sched: add extended scheduling interface.
sched: SCHED_DEADLINE data structures.
sched: SCHED_DEADLINE policy implementation.
sched: SCHED_DEADLINE avg_update accounting.
sched: add schedstats for -deadline tasks.
sched: add resource limits for -deadline tasks.
sched: add latency tracing for -deadline tasks.
sched: drafted deadline inheritance logic.
sched: add bandwidth management for sched_dl.
sched: add sched_dl documentation.

Juri Lelli (3):
sched: SCHED_DEADLINE SMP-related data structures.
sched: SCHED_DEADLINE push and pull logic
sched: speed up -dl pushes with a push-heap.

Harald Gustafsson (1):
sched: add period support for -deadline tasks.

Peter Zijlstra (1):
rtmutex: turn the plist into an rb-tree.

 Documentation/scheduler/sched-deadline.txt |  147 +++
 arch/arm/include/asm/unistd.h              |    3 +
 arch/arm/kernel/calls.S                    |    3 +
 arch/x86/ia32/ia32entry.S                  |    3 +
 arch/x86/include/asm/unistd_32.h           |    5 +-
 arch/x86/include/asm/unistd_64.h           |    6 +
 arch/x86/kernel/syscall_table_32.S         |    3 +
 include/asm-generic/resource.h             |    7 +-
 include/linux/init_task.h                  |   10 +
 include/linux/rtmutex.h                    |   18 +-
 include/linux/sched.h                      |  154 +++-
 include/linux/syscalls.h                   |    7 +
 kernel/Makefile                            |    1 +
 kernel/fork.c                              |    8 +-
 kernel/hrtimer.c                           |    2 +-
 kernel/rtmutex-debug.c                     |   10 +-
 kernel/rtmutex.c                           |  162 +++-
 kernel/rtmutex_common.h                    |   24 +-
 kernel/sched.c                             |  866 ++++++++++++++-
 kernel/sched_cpudl.c                       |  208 ++++
 kernel/sched_cpudl.h                       |   34 +
 kernel/sched_debug.c                       |   43 +
 kernel/sched_dl.c                          | 1585 ++++++++++++++++++++++++++++
 kernel/sched_rt.c                          |    3 +-
 kernel/sched_stoptask.c                    |    2 +-
 kernel/sysctl.c                            |   14 +
 kernel/trace/trace_sched_wakeup.c          |   41 +-
 kernel/trace/trace_selftest.c              |   30 +-
 28 files changed, 3266 insertions(+), 133 deletions(-)