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: a (rare) PSI crash fix, a CPU affinity related balancing
fix, and a toning down of active migration attempts"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/cfs: fix spurious active migration
sched/fair: Fix find_idlest_group() to handle CPU affinity
psi: Fix a division error in psi poll()
sched/psi: Fix sampling error and rare div0 crashes with cgroups and high uptime

+15 -3
+12 -1
kernel/sched/fair.c
··· 7328 7328 load < 16 && !env->sd->nr_balance_failed) 7329 7329 goto next; 7330 7330 7331 - if (load/2 > env->imbalance) 7331 + /* 7332 + * Make sure that we don't migrate too much load. 7333 + * Nevertheless, let relax the constraint if 7334 + * scheduler fails to find a good waiting task to 7335 + * migrate. 7336 + */ 7337 + if (load/2 > env->imbalance && 7338 + env->sd->nr_balance_failed <= env->sd->cache_nice_tries) 7332 7339 goto next; 7333 7340 7334 7341 env->imbalance -= load; ··· 8423 8416 /* There is no idlest group to push tasks to */ 8424 8417 if (!idlest) 8425 8418 return NULL; 8419 + 8420 + /* The local group has been skipped because of CPU affinity */ 8421 + if (!local) 8422 + return idlest; 8426 8423 8427 8424 /* 8428 8425 * If the local group is idler than the selected idlest group
+3 -2
kernel/sched/psi.c
··· 185 185 186 186 for_each_possible_cpu(cpu) 187 187 seqcount_init(&per_cpu_ptr(group->pcpu, cpu)->seq); 188 - group->avg_next_update = sched_clock() + psi_period; 188 + group->avg_last_update = sched_clock(); 189 + group->avg_next_update = group->avg_last_update + psi_period; 189 190 INIT_DELAYED_WORK(&group->avgs_work, psi_avgs_work); 190 191 mutex_init(&group->avgs_lock); 191 192 /* Init trigger-related members */ ··· 482 481 u32 remaining; 483 482 484 483 remaining = win->size - elapsed; 485 - growth += div_u64(win->prev_growth * remaining, win->size); 484 + growth += div64_u64(win->prev_growth * remaining, win->size); 486 485 } 487 486 488 487 return growth;