lkml.org 
[lkml]   [2018]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched/dl : return accurate release rq lock info
On Sat, 6 Oct 2018 09:08:37 +0800
Peng Hao <peng.hao2@zte.com.cn> wrote:

> find_lock_later_rq may or not releease rq lock when return
> later_rq=NULL, but it is fuzzy.
> If not releasing rq lock, it is unnecessary to re-call
> pick_next_pushable_dl_task.
>
> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>


Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

> ---
> kernel/sched/deadline.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index 997ea7b..8e875ec 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -1979,7 +1979,7 @@ static struct rq *find_lock_later_rq(struct task_struct *task, struct rq *rq)
> !dl_task(task) ||
> !task_on_rq_queued(task))) {
> double_unlock_balance(rq, later_rq);
> - later_rq = NULL;
> + later_rq = RETRY_TASK;
> break;
> }
> }
> @@ -2063,7 +2063,9 @@ static int push_dl_task(struct rq *rq)
>
> /* Will lock the rq it'll find */
> later_rq = find_lock_later_rq(next_task, rq);
> - if (!later_rq) {
> + if (!later_rq)
> + goto out;
> + if (later_rq == RETRY_TASK) {
> struct task_struct *task;
>
> /*

\
 
 \ /
  Last update: 2018-10-05 19:51    [W:0.048 / U:3.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site