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>] [day] [month] [year] [list]
Message-ID: <CAJd=RBAi4_6=vnEQ2pZc2Kaykc_3P+U4jnnh1E+viMsxKUrfSg@mail.gmail.com>
Date:	Fri, 6 Jul 2012 20:28:28 +0800
From:	Hillf Danton <dhillf@...il.com>
To:	LKML <linux-kernel@...r.kernel.org>,
	Hillf Danton <dhillf@...il.com>
Subject: [patch] BFS 421-1: cleanup online_cpus

To remove cpu_online_map, lets clean up online_cpus.

SOB: Hillf Danton <dhillf@...il.com>
---

--- a/kernel/sched/bfs.c	Thu Jul  5 21:43:36 2012
+++ b/kernel/sched/bfs.c	Fri Jul  6 20:09:08 2012
@@ -1365,24 +1365,6 @@ can_preempt(struct task_struct *p, int p
 }

 #ifdef CONFIG_SMP
-#ifdef CONFIG_HOTPLUG_CPU
-/*
- * Check to see if there is a task that is affined only to offline CPUs but
- * still wants runtime. This happens to kernel threads during suspend/halt and
- * disabling of CPUs.
- */
-static inline bool online_cpus(struct task_struct *p)
-{
-	return (likely(cpus_intersects(cpu_online_map, p->cpus_allowed)));
-}
-#else /* CONFIG_HOTPLUG_CPU */
-/* All available CPUs are always online without hotplug. */
-static inline bool online_cpus(struct task_struct *p)
-{
-	return true;
-}
-#endif
-
 /*
  * Check to see if p can run on cpu, and if not, whether there are any online
  * CPUs it can run on instead.
@@ -5063,7 +5045,8 @@ static void break_sole_affinity(int src_
 	struct task_struct *p, *t;

 	do_each_thread(t, p) {
-		if (p != idle && !online_cpus(p)) {
+		if (p != idle && !cpumask_intersects(tsk_cpus_allowed(p),
+							cpu_online_mask)) {
 			cpumask_copy(tsk_cpus_allowed(p), cpu_possible_mask);
 			/*
 			 * Don't tell them about moving exiting tasks or
--
--
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