Thread (52 messages) 52 messages, 4 authors, 2020-11-23

Re: [PATCH v3 11/14] sched: Reject CPU affinity changes based on arch_cpu_allowed_mask()

From: Will Deacon <will@kernel.org>
Date: 2020-11-19 16:44:42
Also in: linux-arch, lkml

On Thu, Nov 19, 2020 at 02:30:12PM +0000, Quentin Perret wrote:
On Thursday 19 Nov 2020 at 11:07:24 (+0000), Will Deacon wrote:
quoted
Yeah, the cpuset code ignores the return value of set_cpus_allowed_ptr() in
update_tasks_cpumask() so the failure won't be propagated, but then again I
think that might be the right thing to do. Nothing prevents 32-bit and
64-bit tasks from co-existing in the same cpuseti afaict, so forcing the
64-bit tasks onto the 32-bit-capable cores feels much worse than the
approach taken here imo.
Ack. And thinking about it more, failing the cgroup operation wouldn't
guarantee that the task's affinity and the cpuset are aligned anyway. We
could still exec into a 32 bit task from within a 64 bit-only cpuset.
quoted
The interesting case is what happens if the cpuset for a 32-bit task is
changed to contain only the 64-bit-only cores. I think that's a userspace
bug
Maybe, but I think Android will do exactly that in some cases :/
quoted
but the fallback rq selection should avert disaster.
I thought _this_ patch was 'fixing' this case by making the cpuset
operation pretty much a nop on the task affinity? The fallback rq stuff
is all about hotplug no?
Yeah, sorry, I wasn't clear. This patch postpones disaster until hotplug
off time, when cpuset_cpus_allowed_fallback() will fail and
select_fallback_rq() will have to step in.

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help