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-next>] [day] [month] [year] [list]
Message-Id: <1274312730-3041-1-git-send-email-ncrao@google.com>
Date:	Wed, 19 May 2010 16:45:30 -0700
From:	Nikhil Rao <ncrao@...gle.com>
To:	Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
	Mike Galbraith <efault@....de>
Cc:	Venkatesh Pallipadi <venki@...gle.com>,
	linux-kernel@...r.kernel.org, Nikhil Rao <ncrao@...gle.com>
Subject: [PATCH] sched: fix updating sd->balance_interval in idle_balance()

sd->balance_interval is updated incorrectly when SD_BALANCE_NEWIDLE is not set
in sd->flags. This patch updates sd->balance_interval only when we balance the
domain.

Signed-off-by: Nikhil Rao <ncrao@...gle.com>
---
 kernel/sched_fair.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 217e4a9..c35fe47 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -2996,11 +2996,12 @@ static void idle_balance(int this_cpu, struct rq *this_rq)
 		if (!(sd->flags & SD_LOAD_BALANCE))
 			continue;
 
-		if (sd->flags & SD_BALANCE_NEWIDLE) {
-			/* If we've pulled tasks over stop searching: */
-			pulled_task = load_balance(this_cpu, this_rq,
-						   sd, CPU_NEWLY_IDLE, &balance);
-		}
+		if (!(sd->flags & SD_BALANCE_NEWIDLE))
+			continue;
+
+		/* If we've pulled tasks over stop searching: */
+		pulled_task = load_balance(this_cpu, this_rq, sd,
+					   CPU_NEWLY_IDLE, &balance);
 
 		interval = msecs_to_jiffies(sd->balance_interval);
 		if (time_after(next_balance, sd->last_balance + interval))
-- 
1.7.0.1

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