diff options
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/cputime.c | 6 | ||||
-rw-r--r-- | kernel/sched/deadline.c | 14 |
2 files changed, 11 insertions, 9 deletions
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index 6e3ea4ac1bda..14d2dbf97c53 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c | |||
@@ -683,7 +683,7 @@ static u64 vtime_delta(struct vtime *vtime) | |||
683 | { | 683 | { |
684 | unsigned long long clock; | 684 | unsigned long long clock; |
685 | 685 | ||
686 | clock = sched_clock_cpu(smp_processor_id()); | 686 | clock = sched_clock(); |
687 | if (clock < vtime->starttime) | 687 | if (clock < vtime->starttime) |
688 | return 0; | 688 | return 0; |
689 | 689 | ||
@@ -814,7 +814,7 @@ void arch_vtime_task_switch(struct task_struct *prev) | |||
814 | 814 | ||
815 | write_seqcount_begin(&vtime->seqcount); | 815 | write_seqcount_begin(&vtime->seqcount); |
816 | vtime->state = VTIME_SYS; | 816 | vtime->state = VTIME_SYS; |
817 | vtime->starttime = sched_clock_cpu(smp_processor_id()); | 817 | vtime->starttime = sched_clock(); |
818 | write_seqcount_end(&vtime->seqcount); | 818 | write_seqcount_end(&vtime->seqcount); |
819 | } | 819 | } |
820 | 820 | ||
@@ -826,7 +826,7 @@ void vtime_init_idle(struct task_struct *t, int cpu) | |||
826 | local_irq_save(flags); | 826 | local_irq_save(flags); |
827 | write_seqcount_begin(&vtime->seqcount); | 827 | write_seqcount_begin(&vtime->seqcount); |
828 | vtime->state = VTIME_SYS; | 828 | vtime->state = VTIME_SYS; |
829 | vtime->starttime = sched_clock_cpu(cpu); | 829 | vtime->starttime = sched_clock(); |
830 | write_seqcount_end(&vtime->seqcount); | 830 | write_seqcount_end(&vtime->seqcount); |
831 | local_irq_restore(flags); | 831 | local_irq_restore(flags); |
832 | } | 832 | } |
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index a84299f44b5d..755bd3f1a1a9 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c | |||
@@ -1392,17 +1392,19 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags) | |||
1392 | struct sched_dl_entity *pi_se = &p->dl; | 1392 | struct sched_dl_entity *pi_se = &p->dl; |
1393 | 1393 | ||
1394 | /* | 1394 | /* |
1395 | * Use the scheduling parameters of the top pi-waiter | 1395 | * Use the scheduling parameters of the top pi-waiter task if: |
1396 | * task if we have one and its (absolute) deadline is | 1396 | * - we have a top pi-waiter which is a SCHED_DEADLINE task AND |
1397 | * smaller than our one... OTW we keep our runtime and | 1397 | * - our dl_boosted is set (i.e. the pi-waiter's (absolute) deadline is |
1398 | * deadline. | 1398 | * smaller than our deadline OR we are a !SCHED_DEADLINE task getting |
1399 | * boosted due to a SCHED_DEADLINE pi-waiter). | ||
1400 | * Otherwise we keep our runtime and deadline. | ||
1399 | */ | 1401 | */ |
1400 | if (pi_task && p->dl.dl_boosted && dl_prio(pi_task->normal_prio)) { | 1402 | if (pi_task && dl_prio(pi_task->normal_prio) && p->dl.dl_boosted) { |
1401 | pi_se = &pi_task->dl; | 1403 | pi_se = &pi_task->dl; |
1402 | } else if (!dl_prio(p->normal_prio)) { | 1404 | } else if (!dl_prio(p->normal_prio)) { |
1403 | /* | 1405 | /* |
1404 | * Special case in which we have a !SCHED_DEADLINE task | 1406 | * Special case in which we have a !SCHED_DEADLINE task |
1405 | * that is going to be deboosted, but exceedes its | 1407 | * that is going to be deboosted, but exceeds its |
1406 | * runtime while doing so. No point in replenishing | 1408 | * runtime while doing so. No point in replenishing |
1407 | * it, as it's going to return back to its original | 1409 | * it, as it's going to return back to its original |
1408 | * scheduling class after this. | 1410 | * scheduling class after this. |