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]
Date:   Wed, 5 Jul 2017 13:59:15 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Ganesh Mahendran <opensource.ganesh@...il.com>
Cc:     linux-kernel@...r.kernel.org, mingo@...hat.com,
        stable@...r.kernel.org
Subject: Re: [PATCH] sched/fair: fix contribution calculation

On Wed, Jul 05, 2017 at 04:46:30PM +0800, Ganesh Mahendran wrote:
> Function __compute_runnable_contrib() is to calculate:
>    \Sum 1024*y^n {for (1..n_period)}
> But LOAD_AVG_MAX returns sum of 1024*y^n (0..n_period).
> So we need to subtract 1024*y^0.
> 
> Cc: stable@...r.kernel.org
> Signed-off-by: Ganesh Mahendran <opensource.ganesh@...il.com>
> ---
>  kernel/sched/fair.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 90e26b1..777ad49 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -2508,7 +2508,7 @@ static u32 __compute_runnable_contrib(u64 n)
>  	if (likely(n <= LOAD_AVG_PERIOD))
>  		return runnable_avg_yN_sum[n];
>  	else if (unlikely(n >= LOAD_AVG_MAX_N))
> -		return LOAD_AVG_MAX;
> +		return LOAD_AVG_MAX - 1024;
>  
>  	/* Compute \Sum k^n combining precomputed values for k^i, \Sum k^j */
>  	do {


This code no longer exists...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ