aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/lib/py/utils.py
diff options
context:
space:
mode:
authorJosh Don <[email protected]>2024-11-11 18:27:38 +0000
committerPeter Zijlstra <[email protected]>2024-12-02 11:01:27 +0000
commit70ee7947a29029736a1a06c73a48ff37674a851b (patch)
treec103ac808b517295208f04214cee089573567795 /tools/testing/selftests/net/lib/py/utils.py
parentsched/deadline: Fix replenish_dl_new_period dl_server condition (diff)
downloadkernel-70ee7947a29029736a1a06c73a48ff37674a851b.tar.gz
kernel-70ee7947a29029736a1a06c73a48ff37674a851b.zip
sched: fix warning in sched_setaffinity
Commit 8f9ea86fdf99b added some logic to sched_setaffinity that included a WARN when a per-task affinity assignment races with a cpuset update. Specifically, we can have a race where a cpuset update results in the task affinity no longer being a subset of the cpuset. That's fine; we have a fallback to instead use the cpuset mask. However, we have a WARN set up that will trigger if the cpuset mask has no overlap at all with the requested task affinity. This shouldn't be a warning condition; its trivial to create this condition. Reproduced the warning by the following setup: - $PID inside a cpuset cgroup - another thread repeatedly switching the cpuset cpus from 1-2 to just 1 - another thread repeatedly setting the $PID affinity (via taskset) to 2 Fixes: 8f9ea86fdf99b ("sched: Always preserve the user requested cpumask") Signed-off-by: Josh Don <[email protected]> Acked-and-tested-by: Vincent Guittot <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Waiman Long <[email protected]> Tested-by: Madadi Vineeth Reddy <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions