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:	Fri, 27 Oct 2006 03:13:49 +1000
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Christoph Lameter <clameter@....com>
CC:	akpm@...l.org, Peter Williams <pwil3058@...pond.net.au>,
	linux-kernel@...r.kernel.org,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Dave Chinner <dgc@....com>, Ingo Molnar <mingo@...e.hu>,
	"Siddha, Suresh B" <suresh.b.siddha@...el.com>
Subject: Re: [PATCH 3/5] Use next_balance instead of last_balance

Christoph Lameter wrote:
> On Thu, 26 Oct 2006, Nick Piggin wrote:
> 
> 
>>Actually, it is wrong, so nack.
>>
>>You didn't take into account that balance_interval may have changed,
>>and so might the idle status.
> 
> 
> Hmmmm... We change the point at which we calculate the interval relative 
> to load balancing. So move it after the load balance. This also avoids 
> having to do the calculation if the sched_domain has not expired.

That still doesn't take into account if the CPU goes idle/busy during
the interval.

> 
> Want a new rollup/testing cycle for all of this?
> 
> Index: linux-2.6.19-rc3/kernel/sched.c
> ===================================================================
> --- linux-2.6.19-rc3.orig/kernel/sched.c	2006-10-26 11:31:04.000000000 -0500
> +++ linux-2.6.19-rc3/kernel/sched.c	2006-10-26 11:41:07.129561438 -0500
> @@ -2867,15 +2867,6 @@ static void rebalance_domains(unsigned l
>  		if (!(sd->flags & SD_LOAD_BALANCE))
>  			continue;
>  
> -		interval = sd->balance_interval;
> -		if (idle != SCHED_IDLE)
> -			interval *= sd->busy_factor;
> -
> -		/* scale ms to jiffies */
> -		interval = msecs_to_jiffies(interval);
> -		if (unlikely(!interval))
> -			interval = 1;
> -
>  		if (jiffies >= sd->next_balance) {
>  			if (load_balance(this_cpu, this_rq, sd, idle)) {
>  				/*
> @@ -2885,6 +2876,14 @@ static void rebalance_domains(unsigned l
>  				 */
>  				idle = NOT_IDLE;
>  			}
> +			interval = sd->balance_interval;
> +			if (idle != SCHED_IDLE)
> +				interval *= sd->busy_factor;
> +
> +			/* scale ms to jiffies */
> +			interval = msecs_to_jiffies(interval);
> +			if (unlikely(!interval))
> +				interval = 1;
>  			sd->next_balance += interval;
>  		}
>  		next_balance = min(next_balance, sd->next_balance);
> 


-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ