lkml.org 
[lkml]   [2022]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4 1/2] sched/rt: fix bad task migration for rt tasks
Date

Steven Rostedt <rostedt@goodmis.org> writes:

> On Sat, 09 Jul 2022 05:32:25 +0800
> Schspa Shi <schspa@gmail.com> wrote:
>
>> >> +++ b/kernel/sched/rt.c
>> >> @@ -1998,11 +1998,14 @@ 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,
>> >
>> > I don't understand the "running for a while" part. That doesn't make sense.
>> >
>>
>> When I say "run for a while" I mean as long as the task has
>> run capability, we should check the migrate disabled flag again.
>>
>> > The only way this can happen is that it was scheduled, set
>> > "migrate_disabled" and then got preempted where it's no longer on the run
>> > queue.
>>
>> Yes, it is the only case.
>
> Can we then change the comment, as the "running for a while" is not clear
> to what the issue is, and honestly, sounds misleading.
>
> -- Steve

How about to change this to

/*
* We had to unlock the run queue. In
* 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 was scheduled, set
* "migrate_disabled" and then got preempted, And we
* check task migration disable flag here too.
*/

--
BRs
Schspa Shi

\
 
 \ /
  Last update: 2022-07-12 03:03    [W:0.356 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site