From: Xi Wang <xii@google.com>
To: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: Paul Turner <pjt@google.com>, Ben Segall <bsegall@google.com>,
linux-doc@vger.kernel.org, Xi Wang <xii@google.com>
Subject: [PATCH 0/1] Add micro quanta scheduling class
Date: Fri, 6 Sep 2019 02:34:11 -0700 [thread overview]
Message-ID: <20190906093412.233463-1-xii@google.com> (raw)
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
--
2.23.0.187.g17f5b7556c-goog
next reply other threads:[~2019-09-06 9:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-06 9:34 Xi Wang [this message]
2019-09-06 9:34 ` [PATCH 1/1] sched: Add micro quanta scheduling class Xi Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190906093412.233463-1-xii@google.com \
--to=xii@google.com \
--cc=bsegall@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox