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:
"Smaller fixlets"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched: Fix kernel-doc warnings in kernel/sched/fair.c
sched: Unthrottle rt runqueues in __disable_runtime()
sched: Add missing call to calc_load_exit_idle()
sched: Fix load avg vs cpu-hotplug

+17 -29
+10 -24
kernel/sched/core.c
··· 5304 5304 } 5305 5305 5306 5306 /* 5307 - * While a dead CPU has no uninterruptible tasks queued at this point, 5308 - * it might still have a nonzero ->nr_uninterruptible counter, because 5309 - * for performance reasons the counter is not stricly tracking tasks to 5310 - * their home CPUs. So we just add the counter to another CPU's counter, 5311 - * to keep the global sum constant after CPU-down: 5307 + * Since this CPU is going 'away' for a while, fold any nr_active delta 5308 + * we might have. Assumes we're called after migrate_tasks() so that the 5309 + * nr_active count is stable. 5310 + * 5311 + * Also see the comment "Global load-average calculations". 5312 5312 */ 5313 - static void migrate_nr_uninterruptible(struct rq *rq_src) 5313 + static void calc_load_migrate(struct rq *rq) 5314 5314 { 5315 - struct rq *rq_dest = cpu_rq(cpumask_any(cpu_active_mask)); 5316 - 5317 - rq_dest->nr_uninterruptible += rq_src->nr_uninterruptible; 5318 - rq_src->nr_uninterruptible = 0; 5319 - } 5320 - 5321 - /* 5322 - * remove the tasks which were accounted by rq from calc_load_tasks. 5323 - */ 5324 - static void calc_global_load_remove(struct rq *rq) 5325 - { 5326 - atomic_long_sub(rq->calc_load_active, &calc_load_tasks); 5327 - rq->calc_load_active = 0; 5315 + long delta = calc_load_fold_active(rq); 5316 + if (delta) 5317 + atomic_long_add(delta, &calc_load_tasks); 5328 5318 } 5329 5319 5330 5320 /* ··· 5341 5351 * done here. 5342 5352 */ 5343 5353 rq->stop = NULL; 5344 - 5345 - /* Ensure any throttled groups are reachable by pick_next_task */ 5346 - unthrottle_offline_cfs_rqs(rq); 5347 5354 5348 5355 for ( ; ; ) { 5349 5356 /* ··· 5605 5618 BUG_ON(rq->nr_running != 1); /* the migration thread */ 5606 5619 raw_spin_unlock_irqrestore(&rq->lock, flags); 5607 5620 5608 - migrate_nr_uninterruptible(rq); 5609 - calc_global_load_remove(rq); 5621 + calc_load_migrate(rq); 5610 5622 break; 5611 5623 #endif 5612 5624 }
+5 -4
kernel/sched/fair.c
··· 2052 2052 hrtimer_cancel(&cfs_b->slack_timer); 2053 2053 } 2054 2054 2055 - void unthrottle_offline_cfs_rqs(struct rq *rq) 2055 + static void unthrottle_offline_cfs_rqs(struct rq *rq) 2056 2056 { 2057 2057 struct cfs_rq *cfs_rq; 2058 2058 ··· 2106 2106 return NULL; 2107 2107 } 2108 2108 static inline void destroy_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {} 2109 - void unthrottle_offline_cfs_rqs(struct rq *rq) {} 2109 + static inline void unthrottle_offline_cfs_rqs(struct rq *rq) {} 2110 2110 2111 2111 #endif /* CONFIG_CFS_BANDWIDTH */ 2112 2112 ··· 3658 3658 * @group: sched_group whose statistics are to be updated. 3659 3659 * @load_idx: Load index of sched_domain of this_cpu for load calc. 3660 3660 * @local_group: Does group contain this_cpu. 3661 - * @cpus: Set of cpus considered for load balancing. 3662 3661 * @balance: Should we balance. 3663 3662 * @sgs: variable to hold the statistics for this group. 3664 3663 */ ··· 3804 3805 /** 3805 3806 * update_sd_lb_stats - Update sched_domain's statistics for load balancing. 3806 3807 * @env: The load balancing environment. 3807 - * @cpus: Set of cpus considered for load balancing. 3808 3808 * @balance: Should we balance. 3809 3809 * @sds: variable to hold the statistics for this sched_domain. 3810 3810 */ ··· 4954 4956 static void rq_offline_fair(struct rq *rq) 4955 4957 { 4956 4958 update_sysctl(); 4959 + 4960 + /* Ensure any throttled groups are reachable by pick_next_task */ 4961 + unthrottle_offline_cfs_rqs(rq); 4957 4962 } 4958 4963 4959 4964 #endif /* CONFIG_SMP */
+1
kernel/sched/rt.c
··· 691 691 * runtime - in which case borrowing doesn't make sense. 692 692 */ 693 693 rt_rq->rt_runtime = RUNTIME_INF; 694 + rt_rq->rt_throttled = 0; 694 695 raw_spin_unlock(&rt_rq->rt_runtime_lock); 695 696 raw_spin_unlock(&rt_b->rt_runtime_lock); 696 697 }
-1
kernel/sched/sched.h
··· 1144 1144 1145 1145 extern void init_cfs_rq(struct cfs_rq *cfs_rq); 1146 1146 extern void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq); 1147 - extern void unthrottle_offline_cfs_rqs(struct rq *rq); 1148 1147 1149 1148 extern void account_cfs_bandwidth_used(int enabled, int was_enabled); 1150 1149
+1
kernel/time/tick-sched.c
··· 573 573 tick_do_update_jiffies64(now); 574 574 update_cpu_load_nohz(); 575 575 576 + calc_load_exit_idle(); 576 577 touch_softlockup_watchdog(); 577 578 /* 578 579 * Cancel the scheduled timer and restore the tick