Re: [PATCH v5 18/29] sched/deadline: Move a task's bandwidth only where room was made

From: Mathieu Desnoyers

Date: Fri Nov 13 2026 - 10:49:11 EST


Hi Andrea,

A heads-up, since both are under review: [1] adds SCA_DL_CHECK as
0x10, so if your next version also takes 0x10 and both get merged,
the result would build with the two flags silently sharing a bit.

Thanks for catching this. Your patch was posted first, so it keeps
0x10. SCA_DL_BW_RESERVED goes back to 0x20 in the planned next version.
Juri, that is the reason it will not be 0x10 after all.

Your plan in [2] to change the affinity check and the early exit also
overlaps [1], which moves dl_task_check_affinity() into
__set_cpus_allowed_ptr_locked(), right above that early exit.

Yes. I tried your patch on the planned next version:
- It applies as is on the patches before this one (1 to 17 of v5).
- It conflicts with this patch in two places. Both are textual. One is
the early exit in __set_cpus_allowed_ptr_locked(). The other is the
line after SCA_USER in sched.h.

From reading, the two changes do not contradict each other. The
planned next version also makes sched_setaffinity() of a deadline task
wait for a cpuset attach in progress. That is in sched_setaffinity()
itself, and does not touch the check you move.

I'm happy to rebase [1] on your series, or the other way around,
whichever is easier.

Neither is needed. I propose to carry your patch in the next version,
unchanged, right before this one. I already carry your cpuset_mutex
fix that way. I rebase my patches on top of it. Then one series fixes
the order of the two, and the selftests run on both.

Tell me if you agree, or if you prefer to keep it separate. If your
patch is picked up on its own first, I rebase on it instead.

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com