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, 21 Feb 2014 17:15:08 +0800
From:	Lei Wen <leiwen@...vell.com>
To:	Mike Galbraith <bitbucket@...ine.de>, Lei Wen <leiwen@...vell.com>,
	Peter Zijlstra <peterz@...radead.org>, <mingo@...hat.com>,
	<preeti.lkml@...il.com>, <daniel.lezcano@...aro.org>,
	<viresh.kumar@...aro.org>, <xjian@...vell.com>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH v3] sched: keep quiescent cpu out of idle balance loop

Cpu which is put into quiescent mode, would set its sd
member as NULL, and want others not disturb its task running.
But current scheduler would not checking whether that cpu is
setting in such mode, and still insist the quiescent
cpu to response the nohz load balance.

Fix it by preventing such cpu set nohz.idle_cpus_mask in the
first place.

Signed-off-by: Lei Wen <leiwen@...vell.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Mike Galbraith <bitbucket@...ine.de>
---
Much thanks to Mike Pointing out the root span would be merged when the
last cpu becomes isolated from the crash result checking!

 kernel/sched/fair.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 235cfa7..af30b6a 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6883,6 +6883,14 @@ void nohz_balance_enter_idle(int cpu)
 	if (!cpu_active(cpu))
 		return;
 
+	/*
+	 * If this cpu is isolated, its rq's sd member would becomes NULL.
+	 * Base on this observation, we could exclude this cpu from nohz
+	 * idle balance, so that it would not be disturbed.
+	 */
+	if (!this_rq()->sd)
+		return;
+
 	if (test_bit(NOHZ_TICK_STOPPED, nohz_flags(cpu)))
 		return;
 
-- 
1.8.3.2

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