[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180412081039.17fcc09c@gandalf.local.home>
Date: Thu, 12 Apr 2018 08:10:39 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Li Bin <huawei.libin@...wei.com>
Cc: <peterz@...radead.org>, <mingo@...hat.com>,
<linux-kernel@...r.kernel.org>, <guohanjun@...wei.com>
Subject: Re: [PATCH 1/2] sched/rt.c: pick and check task if
double_lock_balance() unlock the rq
On Thu, 12 Apr 2018 18:58:54 +0800
Li Bin <huawei.libin@...wei.com> wrote:
> @@ -1726,13 +1746,10 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq)
> * 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.
> */
> - if (unlikely(task_rq(task) != rq ||
> - !cpumask_test_cpu(lowest_rq->cpu, &task->cpus_allowed) ||
> - task_running(rq, task) ||
> - !rt_task(task) ||
> - !task_on_rq_queued(task))) {
> + struct task_struct *next_task = pick_next_pushable_task(rq);
Could you declare next_task above the comment. It's better styling.
struct task_struct *next_task;
/*
* Comment
*/
next_task = pick_next_pushable_task(rq);
-- Steve
> + if (unlikely(next_task != task ||
> + !cpumask_test_cpu(lowest_rq->cpu, &task->cpus_allowed))) {
>
> double_unlock_balance(rq, lowest_rq);
> lowest_rq = NULL;
> @@ -1752,26 +1769,6 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq)
Powered by blists - more mailing lists