summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2019-11-05 13:03:12 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2019-11-05 13:03:12 +0530
commitdc45938eae9c8053222076f66d561ac5f27514a6 (patch)
tree135e8e97ecc9615239d9134178d2bb8a2928059e
parentbc89c753ab1a8d496387c301b55107a106ec6dcf (diff)
updates
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rw-r--r--scheduler/sched_idle.html18
-rw-r--r--scheduler/sched_idle.txt16
2 files changed, 19 insertions, 15 deletions
diff --git a/scheduler/sched_idle.html b/scheduler/sched_idle.html
index 0dfecf3..90ab0b6 100644
--- a/scheduler/sched_idle.html
+++ b/scheduler/sched_idle.html
@@ -13,8 +13,8 @@
<p>The Linux kernel scheduler (or the task scheduler) is a complicated beast and a
lot of effort goes into improving it during every kernel release cycle. The 5.4
kernel release will enable users to improve scheduling latency of their
-high-priority tasks by using SCHED_IDLE scheduling policy for the really low
-priority tasks.</p>
+high-priority (interactive) tasks by using SCHED_IDLE scheduling policy for the
+really low priority (background) tasks.</p>
<p>The Linux kernel scheduler consists of many "scheduling classes", an extensible
hierarchy of scheduling modules, and each class may further encapsulate
"scheduling policies" which are handled by the scheduler core in a policy
@@ -136,10 +136,12 @@ run uninterrupted for a sufficient amount of time and hence they are normally
scheduled only after finishing the <code>SCHED_NORMAL</code> activity. The <code>SCHED_IDLE</code>
policy is designed for the lowest priority tasks in the system and will get a
chance to run only if there is nothing else to run. The priority of these tasks
-is even lower than the tasks with nice value of +19. This policy isn&#8217;t widely
-used currently and efforts are being made to improve its support, so people
-start using it in their mainstream solutions; that is the motivation of this
-article as well, we will discuss more on <code>SCHED_IDLE</code> in a bit.</p>
+is considered even lower than the tasks with nice value of +19, as the
+<code>SCHED_IDLE</code> tasks get preempted immediately even by the <code>SCHED_NORMAL</code> task
+with nice value of +19. This policy isn&#8217;t widely used currently and efforts are
+being made to improve its support, so people start using it in their mainstream
+solutions; that is the motivation of this article as well, we will discuss more
+on <code>SCHED_IDLE</code> in a bit.</p>
<p>Last but not the least is the Idle scheduling class (don&#8217;t confuse it with the
<code>SCHED_IDLE</code> scheduling policy). This is the lowest priority scheduling class
and similar to the Stop class, this doesn&#8217;t manage any user task and so
@@ -278,7 +280,7 @@ optimized).</code></pre>
tasks to SCHED_IDLE, so this scheme would increase the probability of
finding an idle CPU for "top-app" tasks by preempting "background"
tasks.</code></pre>
-<p>Clearly this work has a lot of potential and finally we should be using the
+<p>Clearly this work has a lot of potential and finally we must be using the
<code>SCHED_IDLE</code> policy in mainstream products. Going forward, we shall revisit
other places in the scheduler code, like the load-balancer, to see if we can
further reduce the latency of the non <code>SCHED_IDLE</code> tasks.</p>
@@ -286,7 +288,7 @@ further reduce the latency of the non <code>SCHED_IDLE</code> tasks.</p>
<p></p>
<hr><p><small>
Last updated
- 2019-10-24 11:59:59 IST
+ 2019-10-25 13:48:02 IST
</small></p>
</body>
</html>
diff --git a/scheduler/sched_idle.txt b/scheduler/sched_idle.txt
index e9e5131..114a44e 100644
--- a/scheduler/sched_idle.txt
+++ b/scheduler/sched_idle.txt
@@ -4,8 +4,8 @@ Reducing scheduling latency with SCHED_IDLE policy
The Linux kernel scheduler (or the task scheduler) is a complicated beast and a
lot of effort goes into improving it during every kernel release cycle. The 5.4
kernel release will enable users to improve scheduling latency of their
-high-priority tasks by using SCHED_IDLE scheduling policy for the really low
-priority tasks.
+high-priority (interactive) tasks by using SCHED_IDLE scheduling policy for the
+really low priority (background) tasks.
The Linux kernel scheduler consists of many "scheduling classes", an extensible
hierarchy of scheduling modules, and each class may further encapsulate
@@ -138,10 +138,12 @@ run uninterrupted for a sufficient amount of time and hence they are normally
scheduled only after finishing the `SCHED_NORMAL` activity. The `SCHED_IDLE`
policy is designed for the lowest priority tasks in the system and will get a
chance to run only if there is nothing else to run. The priority of these tasks
-is even lower than the tasks with nice value of +19. This policy isn't widely
-used currently and efforts are being made to improve its support, so people
-start using it in their mainstream solutions; that is the motivation of this
-article as well, we will discuss more on `SCHED_IDLE` in a bit.
+is considered even lower than the tasks with nice value of +19, as the
+`SCHED_IDLE` tasks get preempted immediately even by the `SCHED_NORMAL` task
+with nice value of +19. This policy isn't widely used currently and efforts are
+being made to improve its support, so people start using it in their mainstream
+solutions; that is the motivation of this article as well, we will discuss more
+on `SCHED_IDLE` in a bit.
Last but not the least is the Idle scheduling class (don't confuse it with the
`SCHED_IDLE` scheduling policy). This is the lowest priority scheduling class
@@ -296,7 +298,7 @@ Kjos from Google earlier said this in reply to the `SCHED_IDLE` work:
finding an idle CPU for "top-app" tasks by preempting "background"
tasks.
-Clearly this work has a lot of potential and finally we should be using the
+Clearly this work has a lot of potential and finally we must be using the
`SCHED_IDLE` policy in mainstream products. Going forward, we shall revisit
other places in the scheduler code, like the load-balancer, to see if we can
further reduce the latency of the non `SCHED_IDLE` tasks.