public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@redhat.com>
To: Peng Liu <iwtbavbm@gmail.com>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com,
	peterz@infradead.org, vincent.guittot@linaro.org,
	dietmar.eggemann@arm.com, rostedt@goodmis.org,
	bsegall@google.com, mgorman@suse.de,
	Daniel Bristot de Oliveira <bristot@redhat.com>
Subject: Re: [PATCH] sched/deadline: dome some cleanup for push_dl_task()
Date: Fri, 24 Jul 2020 09:14:26 +0200	[thread overview]
Message-ID: <20200724071426.GD14912@localhost.localdomain> (raw)
In-Reply-To: <20200706160442.GA19741@iZj6chx1xj0e0buvshuecpZ>

Hi,

On 07/07/20 00:04, Peng Liu wrote:
> 'commit 840d719604b0 ("sched/deadline: Update rq_clock of later_rq when pushing a task")'
> introduced the update_rq_clock() to fix the "used-before-update" bug.
> 
> 'commit f4904815f97a ("sched/deadline: Fix double accounting of rq/running bw in push & pull")'
> took away the bug source(add_running_bw()).
> 
> We no longer need to update rq_clock in advance, let activate_task()
> worry about that.
> 
> Signed-off-by: Peng Liu <iwtbavbm@gmail.com>
> ---
>  kernel/sched/deadline.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index 504d2f51b0d6..c3fa11f84d93 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -2104,13 +2104,7 @@ static int push_dl_task(struct rq *rq)
>  
>  	deactivate_task(rq, next_task, 0);
>  	set_task_cpu(next_task, later_rq->cpu);
> -
> -	/*
> -	 * Update the later_rq clock here, because the clock is used
> -	 * by the cpufreq_update_util() inside __add_running_bw().
> -	 */
> -	update_rq_clock(later_rq);
> -	activate_task(later_rq, next_task, ENQUEUE_NOCLOCK);
> +	activate_task(later_rq, next_task, 0);
>  	ret = 1;

The change looks good to me, since now add_running_bw() is called later
by enqueue_task_dl(), but rq_clock has already been updated by core's
enqueue_task().

Daniel, Dietmar, a second pair of eyes (since you authored the commits
above)?

I'd chage subject to something like "sched/deadline: Stop updating
rq_clock before pushing a task".

Thanks,

Juri


  reply	other threads:[~2020-07-24  7:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 16:04 [PATCH] sched/deadline: dome some cleanup for push_dl_task() Peng Liu
2020-07-24  7:14 ` Juri Lelli [this message]
2020-07-24 15:31   ` Daniel Bristot de Oliveira
2020-07-24 16:18     ` Dietmar Eggemann
2020-07-26 14:30   ` Peng Liu

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=20200724071426.GD14912@localhost.localdomain \
    --to=juri.lelli@redhat.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=iwtbavbm@gmail.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 \
    /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