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:
"Misc fixes all around the map: an instrumentation fix, a nohz
usability fix, a lockdep annotation fix and two task group scheduling
fixes"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/core: Add missing lockdep_unpin() annotations
sched/deadline: Fix migration of SCHED_DEADLINE tasks
nohz: Revert "nohz: Set isolcpus when nohz_full is set"
sched/fair: Update task group's load_avg after task migration
sched/fair: Fix overly small weight for interactive group entities
sched, tracing: Stop/start critical timings around the idle=poll idle loop

+28 -12
+8 -4
kernel/sched/core.c
··· 2366 2366 trace_sched_wakeup_new(p); 2367 2367 check_preempt_curr(rq, p, WF_FORK); 2368 2368 #ifdef CONFIG_SMP 2369 - if (p->sched_class->task_woken) 2369 + if (p->sched_class->task_woken) { 2370 + /* 2371 + * Nothing relies on rq->lock after this, so its fine to 2372 + * drop it. 2373 + */ 2374 + lockdep_unpin_lock(&rq->lock); 2370 2375 p->sched_class->task_woken(rq, p); 2376 + lockdep_pin_lock(&rq->lock); 2377 + } 2371 2378 #endif 2372 2379 task_rq_unlock(rq, p, &flags); 2373 2380 } ··· 7244 7237 7245 7238 alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL); 7246 7239 alloc_cpumask_var(&fallback_doms, GFP_KERNEL); 7247 - 7248 - /* nohz_full won't take effect without isolating the cpus. */ 7249 - tick_nohz_full_add_cpus_to(cpu_isolated_map); 7250 7240 7251 7241 sched_init_numa(); 7252 7242
+13 -4
kernel/sched/deadline.c
··· 668 668 * Queueing this task back might have overloaded rq, check if we need 669 669 * to kick someone away. 670 670 */ 671 - if (has_pushable_dl_tasks(rq)) 671 + if (has_pushable_dl_tasks(rq)) { 672 + /* 673 + * Nothing relies on rq->lock after this, so its safe to drop 674 + * rq->lock. 675 + */ 676 + lockdep_unpin_lock(&rq->lock); 672 677 push_dl_task(rq); 678 + lockdep_pin_lock(&rq->lock); 679 + } 673 680 #endif 674 681 675 682 unlock: ··· 1073 1066 int target = find_later_rq(p); 1074 1067 1075 1068 if (target != -1 && 1076 - dl_time_before(p->dl.deadline, 1077 - cpu_rq(target)->dl.earliest_dl.curr)) 1069 + (dl_time_before(p->dl.deadline, 1070 + cpu_rq(target)->dl.earliest_dl.curr) || 1071 + (cpu_rq(target)->dl.dl_nr_running == 0))) 1078 1072 cpu = target; 1079 1073 } 1080 1074 rcu_read_unlock(); ··· 1425 1417 1426 1418 later_rq = cpu_rq(cpu); 1427 1419 1428 - if (!dl_time_before(task->dl.deadline, 1420 + if (later_rq->dl.dl_nr_running && 1421 + !dl_time_before(task->dl.deadline, 1429 1422 later_rq->dl.earliest_dl.curr)) { 1430 1423 /* 1431 1424 * Target rq has tasks of equal or earlier deadline,
+5 -4
kernel/sched/fair.c
··· 2363 2363 */ 2364 2364 tg_weight = atomic_long_read(&tg->load_avg); 2365 2365 tg_weight -= cfs_rq->tg_load_avg_contrib; 2366 - tg_weight += cfs_rq_load_avg(cfs_rq); 2366 + tg_weight += cfs_rq->load.weight; 2367 2367 2368 2368 return tg_weight; 2369 2369 } ··· 2373 2373 long tg_weight, load, shares; 2374 2374 2375 2375 tg_weight = calc_tg_weight(tg, cfs_rq); 2376 - load = cfs_rq_load_avg(cfs_rq); 2376 + load = cfs_rq->load.weight; 2377 2377 2378 2378 shares = (tg->shares * load); 2379 2379 if (tg_weight) ··· 2664 2664 /* Group cfs_rq's load_avg is used for task_h_load and update_cfs_share */ 2665 2665 static inline int update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq) 2666 2666 { 2667 - int decayed; 2668 2667 struct sched_avg *sa = &cfs_rq->avg; 2668 + int decayed, removed = 0; 2669 2669 2670 2670 if (atomic_long_read(&cfs_rq->removed_load_avg)) { 2671 2671 long r = atomic_long_xchg(&cfs_rq->removed_load_avg, 0); 2672 2672 sa->load_avg = max_t(long, sa->load_avg - r, 0); 2673 2673 sa->load_sum = max_t(s64, sa->load_sum - r * LOAD_AVG_MAX, 0); 2674 + removed = 1; 2674 2675 } 2675 2676 2676 2677 if (atomic_long_read(&cfs_rq->removed_util_avg)) { ··· 2689 2688 cfs_rq->load_last_update_time_copy = sa->last_update_time; 2690 2689 #endif 2691 2690 2692 - return decayed; 2691 + return decayed || removed; 2693 2692 } 2694 2693 2695 2694 /* Update task and its cfs_rq load average */
+2
kernel/sched/idle.c
··· 57 57 rcu_idle_enter(); 58 58 trace_cpu_idle_rcuidle(0, smp_processor_id()); 59 59 local_irq_enable(); 60 + stop_critical_timings(); 60 61 while (!tif_need_resched() && 61 62 (cpu_idle_force_poll || tick_check_broadcast_expired())) 62 63 cpu_relax(); 64 + start_critical_timings(); 63 65 trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); 64 66 rcu_idle_exit(); 65 67 return 1;