public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Schspa Shi <schspa@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
	vschneid@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] sched/rt: fix bad task migration for rt tasks
Date: Tue, 12 Jul 2022 08:53:56 +0800	[thread overview]
Message-ID: <m2edyrnny9.fsf@gmail.com> (raw)
In-Reply-To: <20220711161037.06b8c1ea@gandalf.local.home>


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

  reply	other threads:[~2022-07-12  1:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 21:17 [PATCH v4 1/2] sched/rt: fix bad task migration for rt tasks Schspa Shi
2022-07-08 21:17 ` [PATCH v4 2/2] sched/rt: Trying to push current task when target disable migrating Schspa Shi
2022-07-08 21:26 ` [PATCH v4 1/2] sched/rt: fix bad task migration for rt tasks Steven Rostedt
2022-07-08 21:32   ` Schspa Shi
2022-07-11 20:10     ` Steven Rostedt
2022-07-12  0:53       ` Schspa Shi [this message]
2022-07-12  1:16         ` Steven Rostedt
2022-07-12  1:33           ` Schspa Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2edyrnny9.fsf@gmail.com \
    --to=schspa@gmail.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox