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: <Pine.LNX.4.64.0610260924440.16978@schroedinger.engr.sgi.com>
Date:	Thu, 26 Oct 2006 09:44:49 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Nick Piggin <nickpiggin@...oo.com.au>
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

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.

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);
-
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