mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
sched/deadline: Document behavior of sched_yield()
This is a documentation only patch, explaining the behavior of sched_yield() when a SCHED_DEADLINE task calls it (give up remaining runtime and be throttled until next period begins). Signed-off-by: Tommaso Cucinotta <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Juri Lelli <[email protected]> Reviewed-by: Luca Abeni <[email protected]> Reviewed-by: Daniel Bristot de Oliveira <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
de58af878d
commit
b95202a3b6
1 changed files with 18 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ CONTENTS
|
|||
4.1 System-wide settings
|
||||
4.2 Task interface
|
||||
4.3 Default behavior
|
||||
4.4 Behavior of sched_yield()
|
||||
5. Tasks CPU affinity
|
||||
5.1 SCHED_DEADLINE and cpusets HOWTO
|
||||
6. Future plans
|
||||
|
|
@ -426,6 +427,23 @@ CONTENTS
|
|||
Finally, notice that in order not to jeopardize the admission control a
|
||||
-deadline task cannot fork.
|
||||
|
||||
|
||||
4.4 Behavior of sched_yield()
|
||||
-----------------------------
|
||||
|
||||
When a SCHED_DEADLINE task calls sched_yield(), it gives up its
|
||||
remaining runtime and is immediately throttled, until the next
|
||||
period, when its runtime will be replenished (a special flag
|
||||
dl_yielded is set and used to handle correctly throttling and runtime
|
||||
replenishment after a call to sched_yield()).
|
||||
|
||||
This behavior of sched_yield() allows the task to wake-up exactly at
|
||||
the beginning of the next period. Also, this may be useful in the
|
||||
future with bandwidth reclaiming mechanisms, where sched_yield() will
|
||||
make the leftoever runtime available for reclamation by other
|
||||
SCHED_DEADLINE tasks.
|
||||
|
||||
|
||||
5. Tasks CPU affinity
|
||||
=====================
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue