Messages in this thread | | | Subject | Re: [PATCH v2 2/6] sched/rt: Re-instate old behavior in select_task_rq_rt | From | Dietmar Eggemann <> | Date | Tue, 25 Feb 2020 15:21:16 +0000 |
| |
On 23.02.20 18:39, Qais Yousef wrote:
[...]
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c > index 4043abe45459..2c3fae637cef 100644 > --- a/kernel/sched/rt.c > +++ b/kernel/sched/rt.c > @@ -1474,6 +1474,13 @@ select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags) > if (test || !rt_task_fits_capacity(p, cpu)) { > int target = find_lowest_rq(p); > > + /* > + * Bail out if we were forcing a migration to find a better > + * fitting CPU but our search failed. > + */ > + if (!test && !rt_task_fits_capacity(p, target)) > + goto out_unlock;
Didn't you loose the 'target != -1' condition from https://lore.kernel.org/r/20200218041620.GD28029@codeaurora.org ?
A call to rt_task_fits_capacity(p, -1) would cause issues on a heterogeneous system.
I tried to provoke this but wasn't able to do so. find_lowest_rq() returns -1 in 4 places. (1) lowest_mask should be there (2) if 'task->nr_cpus_allowed == 1' select_task_rq_rt() wouldn't have been called but maybe (3) or (4) can still return -1.
[...]
| |