mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
sched/deadline: Implement "runtime overrun signal" support
This patch adds the possibility of getting the delivery of a SIGXCPU signal whenever there is a runtime overrun. The request is done through the sched_flags field within the sched_attr structure. Forward port of https://lkml.org/lkml/2009/10/16/170 Tested-by: Mathieu Poirier <[email protected]> Signed-off-by: Juri Lelli <[email protected]> Signed-off-by: Claudio Scordino <[email protected]> Signed-off-by: Luca Abeni <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tommaso Cucinotta <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
7332dec055
commit
34be39305a
5 changed files with 35 additions and 2 deletions
|
|
@ -4085,8 +4085,7 @@ recheck:
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (attr->sched_flags &
|
||||
~(SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_RECLAIM))
|
||||
if (attr->sched_flags & ~SCHED_FLAG_ALL)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1155,6 +1155,12 @@ static void update_curr_dl(struct rq *rq)
|
|||
throttle:
|
||||
if (dl_runtime_exceeded(dl_se) || dl_se->dl_yielded) {
|
||||
dl_se->dl_throttled = 1;
|
||||
|
||||
/* If requested, inform the user about runtime overruns. */
|
||||
if (dl_runtime_exceeded(dl_se) &&
|
||||
(dl_se->flags & SCHED_FLAG_DL_OVERRUN))
|
||||
dl_se->dl_overrun = 1;
|
||||
|
||||
__dequeue_task_dl(rq, curr, 0);
|
||||
if (unlikely(dl_se->dl_boosted || !start_dl_timer(curr)))
|
||||
enqueue_task_dl(rq, curr, ENQUEUE_REPLENISH);
|
||||
|
|
@ -2566,6 +2572,7 @@ void __dl_clear_params(struct task_struct *p)
|
|||
dl_se->dl_throttled = 0;
|
||||
dl_se->dl_yielded = 0;
|
||||
dl_se->dl_non_contending = 0;
|
||||
dl_se->dl_overrun = 0;
|
||||
}
|
||||
|
||||
bool dl_param_changed(struct task_struct *p, const struct sched_attr *attr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue