* [PATCH] sched: Documentation: sched-rt-group: fix example error
@ 2017-01-22 7:22 Zhou Chengming
2017-01-22 10:14 ` [tip:sched/core] sched/Documentation/sched-rt-group: Fix incorrect example tip-bot for Zhou Chengming
0 siblings, 1 reply; 2+ messages in thread
From: Zhou Chengming @ 2017-01-22 7:22 UTC (permalink / raw)
To: linux-kernel, linux-doc
Cc: corbet, iamyooon, mingo, peterz, lizefan, zhouchengming1
I feel that the example given in the document to show the possibility
of task starvation of configurable period is wrong.
The example says group A and B both have 50% bandwidth, and a while (1)
loop in A will run for the full period of B and can starve B's tasks.
So I think the runtime of group A should be 50000us, then the period and
runtime of group B should be 50000us and 25000us.
Signed-off-by: Zhou Chengming <zhouchengming1@huawei.com>
---
Documentation/scheduler/sched-rt-group.txt | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/scheduler/sched-rt-group.txt b/Documentation/scheduler/sched-rt-group.txt
index a03f0d9..d8fce3e 100644
--- a/Documentation/scheduler/sched-rt-group.txt
+++ b/Documentation/scheduler/sched-rt-group.txt
@@ -158,11 +158,11 @@ as its prone to starvation without deadline scheduling.
Consider two sibling groups A and B; both have 50% bandwidth, but A's
period is twice the length of B's.
-* group A: period=100000us, runtime=10000us
- - this runs for 0.01s once every 0.1s
+* group A: period=100000us, runtime=50000us
+ - this runs for 0.05s once every 0.1s
-* group B: period= 50000us, runtime=10000us
- - this runs for 0.01s twice every 0.1s (or once every 0.05 sec).
+* group B: period= 50000us, runtime=25000us
+ - this runs for 0.025s twice every 0.1s (or once every 0.05 sec).
This means that currently a while (1) loop in A will run for the full period of
B and can starve B's tasks (assuming they are of lower priority) for a whole
--
1.7.7
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:sched/core] sched/Documentation/sched-rt-group: Fix incorrect example
2017-01-22 7:22 [PATCH] sched: Documentation: sched-rt-group: fix example error Zhou Chengming
@ 2017-01-22 10:14 ` tip-bot for Zhou Chengming
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Zhou Chengming @ 2017-01-22 10:14 UTC (permalink / raw)
To: linux-tip-commits
Cc: hpa, peterz, linux-kernel, torvalds, zhouchengming1, mingo, tglx
Commit-ID: 3a09b8d45b3c05d49e581831de626927c37599f8
Gitweb: http://git.kernel.org/tip/3a09b8d45b3c05d49e581831de626927c37599f8
Author: Zhou Chengming <zhouchengming1@huawei.com>
AuthorDate: Sun, 22 Jan 2017 15:22:35 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 22 Jan 2017 10:34:17 +0100
sched/Documentation/sched-rt-group: Fix incorrect example
I feel that the example given in the document to show the possibility
of task starvation of configurable period is wrong.
The example says group A and B both have 50% bandwidth, and a while (1)
loop in A will run for the full period of B and can starve B's tasks.
So I think the runtime of group A should be 50000us, then the period and
runtime of group B should be 50000us and 25000us.
Signed-off-by: Zhou Chengming <zhouchengming1@huawei.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: corbet@lwn.net
Cc: iamyooon@gmail.com
Cc: linux-doc@vger.kernel.org
Cc: lizefan@huawei.com
Link: http://lkml.kernel.org/r/1485069755-44287-1-git-send-email-zhouchengming1@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
Documentation/scheduler/sched-rt-group.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/scheduler/sched-rt-group.txt b/Documentation/scheduler/sched-rt-group.txt
index a03f0d9..d8fce3e 100644
--- a/Documentation/scheduler/sched-rt-group.txt
+++ b/Documentation/scheduler/sched-rt-group.txt
@@ -158,11 +158,11 @@ as its prone to starvation without deadline scheduling.
Consider two sibling groups A and B; both have 50% bandwidth, but A's
period is twice the length of B's.
-* group A: period=100000us, runtime=10000us
- - this runs for 0.01s once every 0.1s
+* group A: period=100000us, runtime=50000us
+ - this runs for 0.05s once every 0.1s
-* group B: period= 50000us, runtime=10000us
- - this runs for 0.01s twice every 0.1s (or once every 0.05 sec).
+* group B: period= 50000us, runtime=25000us
+ - this runs for 0.025s twice every 0.1s (or once every 0.05 sec).
This means that currently a while (1) loop in A will run for the full period of
B and can starve B's tasks (assuming they are of lower priority) for a whole
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-22 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-22 7:22 [PATCH] sched: Documentation: sched-rt-group: fix example error Zhou Chengming
2017-01-22 10:14 ` [tip:sched/core] sched/Documentation/sched-rt-group: Fix incorrect example tip-bot for Zhou Chengming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®