mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Li Bin <huawei.libin@huawei.com>
Cc: <peterz@infradead.org>, <mingo@redhat.com>,
	<linux-kernel@vger.kernel.org>, <guohanjun@huawei.com>
Subject: Re: [PATCH 2/2] sched/deadline.c: pick and check task if double_lock_balance() unlock the rq
Date: Thu, 12 Apr 2018 08:12:37 -0400	[thread overview]
Message-ID: <20180412081237.2a212c95@gandalf.local.home> (raw)
In-Reply-To: <1523530735-20011-3-git-send-email-huawei.libin@huawei.com>

On Thu, 12 Apr 2018 18:58:55 +0800
Li Bin <huawei.libin@huawei.com> wrote:

> @@ -1965,11 +1985,9 @@ static struct rq *find_lock_later_rq(struct task_struct *task, struct rq *rq)
>  
>  		/* Retry if something changed. */
>  		if (double_lock_balance(rq, later_rq)) {
> -			if (unlikely(task_rq(task) != rq ||
> -				     !cpumask_test_cpu(later_rq->cpu, &task->cpus_allowed) ||
> -				     task_running(rq, task) ||
> -				     !dl_task(task) ||
> -				     !task_on_rq_queued(task))) {
> +			struct task_struct *next_task = pick_next_pushable_dl_task(rq);

I would do the same thing here, and add the comment from rt.c as it
is the same reason.

-- Steve

> +			if (unlikely(next_task != task ||
> +						!cpumask_test_cpu(later_rq->cpu, &task->cpus_allowed))) {
>  				double_unlock_balance(rq, later_rq);
>  				later_rq = NULL;

  reply	other threads:[~2018-04-12 12:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 10:58 [PATCH 0/2] sched: " Li Bin
2018-04-12 10:58 ` [PATCH 1/2] sched/rt.c: " Li Bin
2018-04-12 12:10   ` Steven Rostedt
2018-04-12 10:58 ` [PATCH 2/2] sched/deadline.c: " Li Bin
2018-04-12 12:12   ` Steven Rostedt [this message]
2018-04-12 12:11 ` [PATCH 0/2] sched: " Peter Zijlstra
2018-04-12 12:20   ` Steven Rostedt
2018-04-12 12:24     ` Libin (Huawei)

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=20180412081237.2a212c95@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=guohanjun@huawei.com \
    --cc=huawei.libin@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /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

all inboxes | Powered by JetHome®