Hi, sched_setattr for SCHED_DEADLINE fails if it is called after setting cpuset that doesn't include all CPUs. The sched_deadline document states that cgroup/cpuset should be used for task affinity. But I got errno EPERM when calling sched_setattr, after setting cpuset. Section 5.1 example in sched_deadline document is broken. Not only rt-app doesn't run in the way shown in the example anymore, but also other sched_deadline program fails. rt-tests deadline_test.c illustrated a working way to use cpuset for sched_deadline tasks. It sets cpuset *after* sched_setattr (https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git/tree/src/sched_deadline/deadline_test.c?h=unstable/devel/latest). I suppose this is the only way to assign CPUs for sched_dealine tasks now. Can anyone please explain why sched_setattr fails after setting cpuset? Does the sched_deadline scheduler rejects both affinity mask and cpuset now? Does this mean admission test always assume all CPUs and no admission test would be examined when setting the cpuset of the task? Thanks, Ming