Skip to content

Commit

Permalink
sched/Documentation/sched-rt-group: Fix incorrect example
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
zhouchengming1 authored and Ingo Molnar committed Jan 22, 2017
1 parent acb0405 commit 3a09b8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Documentation/scheduler/sched-rt-group.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a09b8d

Please sign in to comment.