mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Zhihui Zhang <zzhsuny@gmail.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
	Juri Lelli <juri.lelli@gmail.com>
Subject: Re: [PATCH] [sched] Don't account time after deadline twice
Date: Tue, 1 Jul 2014 15:08:16 +0200	[thread overview]
Message-ID: <20140701130816.GR6758@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1404091570-5041-1-git-send-email-zzhsuny@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

On Sun, Jun 29, 2014 at 09:26:10PM -0400, Zhihui Zhang wrote:
> Unless we want to double-penalize an overrun task, the time after the deadline
> and before the current time is already accounted in the negative dl_se->runtime
> value. So we can leave it as is in the case of dmiss && rorun.

Juri?

> Signed-off-by: Zhihui Zhang <zzhsuny@gmail.com>
> ---
>  kernel/sched/deadline.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index fc4f98b1..67df0d6 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -579,10 +579,8 @@ int dl_runtime_exceeded(struct rq *rq, struct sched_dl_entity *dl_se)
>  	 * the next instance. Thus, if we do not account that, we are
>  	 * stealing bandwidth from the system at each deadline miss!
>  	 */
> -	if (dmiss) {
> -		dl_se->runtime = rorun ? dl_se->runtime : 0;
> -		dl_se->runtime -= rq_clock(rq) - dl_se->deadline;
> -	}
> +	if (dmiss && !rorun)
> +		dl_se->runtime = dl_se->deadline - rq_clock(rq);
>  
>  	return 1;
>  }
> -- 
> 1.8.1.2
> 

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-07-01 13:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30  1:26 Zhihui Zhang
2014-07-01 13:08 ` Peter Zijlstra [this message]
2014-07-01 13:59   ` Juri Lelli
     [not found]     ` <CADFvMYKzpihC3GLwNFZW0KCrZQY5FDSH5EQd4iLmHLK+hauDWA@mail.gmail.com>
2014-07-03  9:50       ` Juri Lelli
2014-07-04  1:41         ` Zhihui Zhang

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=20140701130816.GR6758@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=juri.lelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=zzhsuny@gmail.com \
    /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

Powered by JetHome