mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 23:50:02 +02:00
Misc scheduler fixes:
- Add missing cpus_read_lock locking to rebuild_sched_domains()
(Sebastian Andrzej Siewior)
- Fix division by zero bug in tg_cpus() that can be triggered
with empty cpusets (Jake Steinman)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-----BEGIN PGP SIGNATURE-----
iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmqKGdMRHG1pbmdvQGtl
cm5lbC5vcmcACgkQEnMQ0APhK1jQ3w/9Hpnbu78VJjicFBH/De/xXJ10FBJrZMI2
WzS7XXs2AeSPM9aUrhwkVgus/6x0rkAShht0tb9+ax6/DcDDxcSW2tBzCUDZ++Wu
g1oUDlbEP8OAtotJQLx3ss+/vgEjTEv7gidMNEIdqGRVlMyfUmAvBZ0C9REdFZT1
Lq8I0KtEVNKCLMi5LfcafQTHld4o67Wb2d6DqMDbSCkT45sjGvlVOmYnJPhVtUqs
JaOdvit7uheOgc/mtlWsdJXd4yYtKlMpqq5tzQSCGEfReoMdsFa8FXpaZiT/kn6N
XuCaqgtUG5J94bREzNxpsfqKclK4QWqUj3MmD2i5vzoGJkEiXDyY6B6WNqGex2KG
gJvglaW+HfyDjh8RB5n3KOGX6ikYtDBYc8HtmJewOfEGQnX/c+E7Xhl4/9u1CUnN
6z47IP80Ch8tWQNz5XZUplzbm8DL+gYMFdh8L8oRXab3rFby72h+Ftxz/epNP14W
1D1mKZE+TkeyGnKk1cidf/cz60qPBPrLp3gYzbOeaJPk5y388t/gmO+V07Mwzl2Q
O17hkIk0+4ySiRvnd8IxDowTWz53FE9qPoky5zPRGf+SvZXu9GAbY1Hwo+jl6Qle
DTg1jptYkTe5Mnttmxgi2gSTPofrGloUqXAMP/T+U+Qos+dF/ujm4pgVdWsLLD/F
rhBjdJRybrE=
=RQRK
-----END PGP SIGNATURE-----
Merge tag 'sched-urgent-2026-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar:
- Add missing cpus_read_lock locking to rebuild_sched_domains()
(Sebastian Andrzej Siewior)
- Fix division by zero bug in tg_cpus() that can be triggered with
empty cpusets (Jake Steinman)
* tag 'sched-urgent-2026-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/fair: Floor tg_cpus() at 1
sched/topology: Add a cpus_read_lock to rebuild_sched_domains()
This commit is contained in:
commit
2709dd5ae3
|
|
@ -279,6 +279,7 @@ static inline void dl_rebuild_rd_accounting(void)
|
|||
|
||||
static inline void rebuild_sched_domains(void)
|
||||
{
|
||||
guard(cpus_read_lock)();
|
||||
partition_sched_domains(1, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4934,7 +4934,12 @@ static int tg_cpus(struct task_group *tg)
|
|||
nr = cpuset_num_cpus(cgrp);
|
||||
}
|
||||
|
||||
return nr;
|
||||
/*
|
||||
* An empty cpuset would propagate a 0 shares_max into
|
||||
* __calc_smp_shares(), where clamp() yields hi when hi < lo and so
|
||||
* defeats the MIN_SHARES floor. Match tg_tasks(), which floors at 1.
|
||||
*/
|
||||
return max(nr, 1);
|
||||
}
|
||||
|
||||
static inline int tg_tasks(struct task_group *tg)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user