Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
"A cputime fix and code comments/organization fix to the deadline
scheduler"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/deadline: Fix confusing comments about selection of top pi-waiter
sched/cputime: Don't use smp_processor_id() in preemptible context

+11 -9
+3 -3
kernel/sched/cputime.c
··· 683 683 { 684 684 unsigned long long clock; 685 685 686 - clock = sched_clock_cpu(smp_processor_id()); 686 + clock = sched_clock(); 687 687 if (clock < vtime->starttime) 688 688 return 0; 689 689 ··· 814 814 815 815 write_seqcount_begin(&vtime->seqcount); 816 816 vtime->state = VTIME_SYS; 817 - vtime->starttime = sched_clock_cpu(smp_processor_id()); 817 + vtime->starttime = sched_clock(); 818 818 write_seqcount_end(&vtime->seqcount); 819 819 } 820 820 ··· 826 826 local_irq_save(flags); 827 827 write_seqcount_begin(&vtime->seqcount); 828 828 vtime->state = VTIME_SYS; 829 - vtime->starttime = sched_clock_cpu(cpu); 829 + vtime->starttime = sched_clock(); 830 830 write_seqcount_end(&vtime->seqcount); 831 831 local_irq_restore(flags); 832 832 }
+8 -6
kernel/sched/deadline.c
··· 1392 1392 struct sched_dl_entity *pi_se = &p->dl; 1393 1393 1394 1394 /* 1395 - * Use the scheduling parameters of the top pi-waiter 1396 - * task if we have one and its (absolute) deadline is 1397 - * smaller than our one... OTW we keep our runtime and 1398 - * deadline. 1395 + * Use the scheduling parameters of the top pi-waiter task if: 1396 + * - we have a top pi-waiter which is a SCHED_DEADLINE task AND 1397 + * - our dl_boosted is set (i.e. the pi-waiter's (absolute) deadline is 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 1403 pi_se = &pi_task->dl; 1402 1404 } else if (!dl_prio(p->normal_prio)) { 1403 1405 /* 1404 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 1408 * runtime while doing so. No point in replenishing 1407 1409 * it, as it's going to return back to its original 1408 1410 * scheduling class after this.