mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
Scheduler fix:
- Avoid false positive migration warning for proxy donors
(Andrea Righi)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-----BEGIN PGP SIGNATURE-----
iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmqvqssRHG1pbmdvQGtl
cm5lbC5vcmcACgkQEnMQ0APhK1gPzBAAhE9hcpkBV6vNW9xzBDKdGPxRjch2vcfu
lQbx7da1yC2rHU7RDlcdfEgkhAqTRwEAXKz26zth3sDHLk43tusuNtqG3swELhNW
YAGbHjdn87snQlmP8AOK4EaT3uE5NjWqRSIJWMK+AhWSwqO/zzK91T6yZyQY0fM4
3Edp8CFo3IeyOzCR96vsob2x1fFQhuR//5fWul3uuB0EZ8VA5FhH3ene6VCm7P/1
dauxX0rMTb2730qNXA8cHROZq+bwhqTZOUaoOZ33WxnRPkvY9mV/hZsN8JnJuzBE
ogzyyorcl8dFH8qOapos9Cp3tQj9GkTX7mXWDbuUflt/8uOXtQMf75kFGBVI5NUw
2xNfgubTYGo6Qc1C+wyOhGYJ6T5Al+083pV/vPc4y7Z1i7RgZ94QypMuZuaR/RqS
z+RQcdNQlXiRIAIILGJqq1xdbaCJvbVx3tiFZkhPse6ioOF6UNGbQiNExAq3v5BU
ocvhBuf9p/uvRmfs+ZtQNqAAjZUL7tQPvdFAsjxKjuI2Z5YGPROy1L9NdYKfzryM
yWOEkV2mdn97CwzDS+auC0HmPkGqf8we2VI5Ub4R35UPqDcV6vc5BAnwzAbuxAmc
K7mQOMDEaRkbVQ0MoSMdidIXLL0AcN+BROBUtHv8kqJur6nADE3K3HZNdhr2ViLN
eisNI6m8pLk=
=BEte
-----END PGP SIGNATURE-----
Merge tag 'sched-urgent-2026-09-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fix from Ingo Molnar:
- Avoid false positive migration warning for proxy donors
(Andrea Righi)
* tag 'sched-urgent-2026-09-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/core: Avoid false migration warning for proxy donors
This commit is contained in:
commit
fecbe78ac0
|
|
@ -3351,6 +3351,8 @@ void relax_compatible_cpus_allowed_ptr(struct task_struct *p)
|
|||
void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
|
||||
{
|
||||
unsigned int state = READ_ONCE(p->__state);
|
||||
bool proxy_migrated = sched_proxy_exec() && p->is_blocked &&
|
||||
task_cpu(p) != p->wake_cpu;
|
||||
|
||||
/*
|
||||
* We should never call set_task_cpu() on a blocked task,
|
||||
|
|
@ -3386,7 +3388,12 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
|
|||
*/
|
||||
WARN_ON_ONCE(!cpu_online(new_cpu));
|
||||
|
||||
WARN_ON_ONCE(is_migration_disabled(p));
|
||||
/*
|
||||
* Proxy execution can move a blocked task's scheduling context to any
|
||||
* CPU without moving its migration-disabled execution context. The
|
||||
* wakeup path will return the task to a CPU where it can execute.
|
||||
*/
|
||||
WARN_ON_ONCE(is_migration_disabled(p) && !proxy_migrated);
|
||||
|
||||
trace_sched_migrate_task(p, new_cpu);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user