[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 06 Jun 2009 14:55:34 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Avi Kivity <avi@...hat.com>, Rusty Russell <rusty@...tcorp.com.au>,
Ingo Molnar <mingo@...e.hu>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
CC: Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH 5/6] core: use cpumask_copy instead of = for cpus_allowed
in fork
so later could use nr_cpumask_bits in cpumask_size when MAXSMP is used
Signed-off-by: Yinghai Lu <yinghai@...nel.org>
---
arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 52 ++++++++++++++++++++----------
kernel/fork.c | 2 -
2 files changed, 36 insertions(+), 18 deletions(-)
Index: linux-2.6/kernel/fork.c
===================================================================
--- linux-2.6.orig/kernel/fork.c
+++ linux-2.6/kernel/fork.c
@@ -1207,7 +1207,7 @@ static struct task_struct *copy_process(
* to ensure it is on a valid CPU (and if not, just force it back to
* parent's CPU). This avoids alot of nasty races.
*/
- p->cpus_allowed = current->cpus_allowed;
+ cpumask_copy(&p->cpus_allowed, ¤t->cpus_allowed);
p->rt.nr_cpus_allowed = current->rt.nr_cpus_allowed;
if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) ||
!cpu_online(task_cpu(p))))
--
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