mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Peng Hao <peng.hao2@zte.com.cn>
Cc: mingo@redhat.com, peterz@infradead.org,
	andrea.parri@amarulasolutions.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH]  sched/dl : return accurate release rq lock info
Date: Fri, 5 Oct 2018 13:50:35 -0400	[thread overview]
Message-ID: <20181005135035.10a99573@gandalf.local.home> (raw)
In-Reply-To: <1538788117-45448-1-git-send-email-peng.hao2@zte.com.cn>

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;
>  
>  		/*


  reply	other threads:[~2018-10-05 17:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-06  1:08 Peng Hao
2018-10-05 17:50 ` Steven Rostedt [this message]
2018-10-08  8:47 ` Juri Lelli

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=20181005135035.10a99573@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peng.hao2@zte.com.cn \
    --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®