mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@arm.com>
To: Byungchul Park <byungchul.park@lge.com>
Cc: peterz@infradead.org, mingo@kernel.org,
	linux-kernel@vger.kernel.org, tkhai@yandex.ru
Subject: Re: [PATCH] sched/deadline: Remove redundant code replenishing runtime
Date: Fri, 10 Feb 2017 13:39:33 +0000	[thread overview]
Message-ID: <20170210133933.GA6123@e106622-lin> (raw)
In-Reply-To: <1486717888-30580-1-git-send-email-byungchul.park@lge.com>

Hi,

On 10/02/17 18:11, Byungchul Park wrote:
> For a task passing its deadline while !rq, it will be replenished
> in the following path because dl_se->deadline < rq_lock.
> 
>    enqueue_dl_entity(ENQUEUE_WAKEUP)
>       update_dl_entity
> 
> Therefore, code replenishing it in the timer callback in the case is
> unnecessary. This is not for enhancing performance but just for removing
> a redundant code.
> 
> Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> ---
>  kernel/sched/deadline.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index 27737f3..9c77696 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -624,10 +624,8 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
>  	 * We can be both throttled and !queued. Replenish the counter
>  	 * but do not enqueue -- wait for our wakeup to do that.
>  	 */
> -	if (!task_on_rq_queued(p)) {
> -		replenish_dl_entity(dl_se, dl_se);

I think we actually want to replenish and set the next deadline at this
point of time, not the one that we get when the task will eventually wake up.

Best,

- Juri

  reply	other threads:[~2017-02-10 13:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10  9:11 Byungchul Park
2017-02-10 13:39 ` Juri Lelli [this message]
2017-02-13  2:30   ` Byungchul Park
2017-02-13  4:29     ` Byungchul Park
2017-02-13 15:24       ` Juri Lelli
2017-02-13 23:42         ` Byungchul Park
2017-02-14  2:06           ` Byungchul Park
2017-02-14 10:54             ` 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=20170210133933.GA6123@e106622-lin \
    --to=juri.lelli@arm.com \
    --cc=byungchul.park@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tkhai@yandex.ru \
    /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®