-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set affinity for a thread scheduled by shed-deadline #38
Comments
Is it possible to reset the "cpus_allowed" for every thread ( in the code of "cpus" ) ? |
hi z-linlinlin, As you mentioned above, we can't restrict cpus allowed for deadline scheduler so it's up to the writer of the json file use case to ensure that this will not happen. |
IIUC, deadline performs the admittance test only once when a task is changed to deadline class, which means we can't be changing affinity after thread creation. However I think it should be possible to use cpusets to restrict deadline tasks so long as you don't go changing them after creation - but you would need to add better cgroup support to rt-app first. See #49 From the deadline docs in-kernel:
-deadline tasks cannot have an affinity mask smaller that the entire 5.1 SCHED_DEADLINE and cpusets HOWTOAn example of a simple configuration (pin a -deadline task to CPU0) mkdir /dev/cpuset |
Also when parameters are changed. And when cpuset masks change as well (e.g., a check is performed to see if shrinking a cpumask down still leaves enough bandwidth for already admitted tasks). You are right that the only interface we have at the moment to deal with affinities is using cpusets. Admission control (and affinity checks) can however be disabled by writing -1 in sched_rt_runtime_us. |
I'm trying to run a deadline taskset into a cpuset made with 2 cores. The taskset is the following:
I create the cpuset as said before by @credp, the only difference is
The same taskset into a different terminal works as expected. What am I doing wrong? EDIT: |
So, is this fixed/not a bug as per discussion happening at #101 ? |
Yes, I think so. |
Since affinity setting is currently disabled for tasks handled by sched-deadline, how can we restrict threads to certain cpus but using the policy sched-deadline ?
The text was updated successfully, but these errors were encountered: