lkml.org 
[lkml]   [2022]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] sched: fix bad task migration for rt tasks
Date
On 24/06/22 02:29, Schspa Shi wrote:
> @@ -1998,12 +1998,15 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq)
> * the mean time, task could have
> * migrated already or had its affinity changed.
> * Also make sure that it wasn't scheduled on its rq.
> + * It is possible the task has running for a while,
> + * And we check task migration disable flag again.
> */
> if (unlikely(task_rq(task) != rq ||
> !cpumask_test_cpu(lowest_rq->cpu, &task->cpus_mask) ||

cf. 95158a89dd50 ("sched,rt: Use the full cpumask for balancing"), this
made sense to me back then but not so much anymore... Shouldn't this have
remained a ->cpus_ptr check?

I'm going to revisit that commit, I evicted too much of it.

> task_running(rq, task) ||
> !rt_task(task) ||
> - !task_on_rq_queued(task))) {
> + !task_on_rq_queued(task) ||
> + is_migration_disabled(task))) {
>
> double_unlock_balance(rq, lowest_rq);
> lowest_rq = NULL;
> --
> 2.24.3 (Apple Git-128)

\
 
 \ /
  Last update: 2022-06-24 12:57    [W:0.044 / U:2.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site