lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140701130816.GR6758@twins.programming.kicks-ass.net>
Date:	Tue, 1 Jul 2014 15:08:16 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Zhihui Zhang <zzhsuny@...il.com>
Cc:	mingo@...hat.com, linux-kernel@...r.kernel.org,
	Juri Lelli <juri.lelli@...il.com>
Subject: Re: [PATCH] [sched] Don't account time after deadline twice

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@...il.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
> 

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ