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:	Mon, 2 Feb 2009 13:23:43 +0100
From:	Christian Borntraeger <borntraeger@...ibm.com>
To:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	Suresh B <suresh.b.siddha@...el.com>
Cc:	linux-kernel@...r.kernel.org,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: [PATCH v2] NOHZ: fix nohz on cpu unplug

After some testing, I think this patch is better:
[PATCH] NOHZ: fix nohz on cpu unplug

From: Christian Borntraeger <borntraeger@...ibm.com>

After using cpu unplug I have seen one cpu with full ticks, even
on a idle systems. It turns out that nohz.cpu_mask is not updated on
cpu unplug. 
In select_nohz_load_balancer we check if the system is completely
idle to turn of load balancing. We compare cpu_online_map with
nohz.cpu_mask.
Since cpu_online_map is updated on cpu unplug, but nohz.cpu_mask is
not, the check fails and the scheduler believes that we need an 
"idle load balancer" even on a fully idle system. Since the ilb 
cpu does not deactivate the timer tick this breaks NOHZ.

This patch clear the nohz bits in the migration_call, a function that
is already called by the cpu hotplug notifier.

Opinions?

Signed-off-by: Christian Borntraeger <borntraeger@...ibm.com>
---
 kernel/sched.c |    1 +
 1 file changed, 1 insertion(+)

Index: kvm/kernel/sched.c
===================================================================
--- kvm.orig/kernel/sched.c
+++ kvm/kernel/sched.c
@@ -6696,6 +6696,7 @@ migration_call(struct notifier_block *nf
 		rq->idle->sched_class = &idle_sched_class;
 		migrate_dead_tasks(cpu);
 		spin_unlock_irq(&rq->lock);
+		cpumask_clear_cpu(cpu, nohz.cpu_mask);
 		cpuset_unlock();
 		migrate_nr_uninterruptible(rq);
 		BUG_ON(rq->nr_running != 0);
--
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