Skip to content

Add micro quanta scheduling class

Xi Wang linux-doc lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1sched: Add micro quanta scheduling classDocumentation/scheduler/sched-microq.txt include/linux/sched.h include/linux/sched/sysctl.h +12 more+1135 -240 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/1] Add micro quanta scheduling class

This is a scheduling class that does one thing really well:
microsecond level scheduling granularity. There are many problems It doesn’t solve, e.g. there is minimal mutlicore support. Context switch and cache overheads are going to be higher but we found benefits outweigh drawbacks for certain applications.

It can be used in two different but related ways:

Provide softirq like scheduling latency for kernel and userspace threads. Somewhat safer and easier to use than both softirq and rt classes - microsecond level time slicing means a microq task can share a cpu with a cfs task and still maintain low scheduling latency. With rt classes users often have to choose between starving cfs tasks (rt bandwidht control not activated) and high rt tail latency (rt bandwidth control activated).

When busy polling is desired, we can run the busy polling thread under the microq class with less than 100% of allocated cpu bandwidth. The response latency would still be low and some cpu cycles are recovered from the busy polling loop - it is a middle ground between interrupt driven and busy polling.

Xi Wang (1):
sched: Add micro quanta scheduling class

 Documentation/scheduler/sched-microq.txt |  72 +++
 include/linux/sched.h                    |  12 +
 include/linux/sched/sysctl.h             |  12 +
 include/uapi/linux/sched.h               |   1 +
 init/Kconfig                             |  13 +
 kernel/sched/Makefile                    |   1 +
 kernel/sched/core.c                      | 138 ++++-
 kernel/sched/debug.c                     |  28 +
 kernel/sched/fair.c                      |   4 +-
 kernel/sched/microq.c                    | 750 +++++++++++++++++++++++
 kernel/sched/pelt.c                      |  30 +-
 kernel/sched/pelt.h                      |   6 +
 kernel/sched/rt.c                        |   6 +-
 kernel/sched/sched.h                     |  63 +-
 kernel/sysctl.c                          |  23 +
 15 files changed, 1135 insertions(+), 24 deletions(-)
 create mode 100644 Documentation/scheduler/sched-microq.txt
 create mode 100644 kernel/sched/microq.c
Signature · 1 line
2.23.0.187.g17f5b7556c-goog