[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110413193219.GF3987@mtj.dyndns.org>
Date: Thu, 14 Apr 2011 04:32:19 +0900
From: Tejun Heo <tj@...nel.org>
To: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Yinghai Lu <yinghai@...nel.org>,
Brian Gerst <brgerst@...il.com>,
Cyrill Gorcunov <gorcunov@...il.com>,
Shaohui Zheng <shaohui.zheng@...el.com>,
David Rientjes <rientjes@...gle.com>,
Ingo Molnar <mingo@...e.hu>,
"H. Peter Anvin" <hpa@...ux.intel.com>
Subject: Re: [PATCH] x86-64, NUMA: fix fakenuma boot failure
Hello,
On Wed, Apr 13, 2011 at 04:02:43PM +0900, KOSAKI Motohiro wrote:
> Your patch have two mistake.
>
> 1) link_thread_siblings() is for HT
> set_cpu_sibling_map() has another sibling calculations.
> 2) numa_set_node() is not enough. scheduler is using node_to_cpumask_map[] too.
Thanks for seeing this through but your patch is badly whitespace
broken. Can you please check your mail setup and repost? Also, some
comments below.
> btw, Please see cpu_coregroup_mask(). its return value depend on
> sched_mc_power_savings and sched_smt_power_savings. then, we need to care
> both cpu_core_mask and cpu_llc_shared_mask. I think.
Hmmmm....
> +static void __cpuinit node_cpumap_same_phys(int cpu1, int cpu2)
What does the "phys" mean? Maybe something like
check_cpu_siblings_on_same_node() is a better name?
> + /*
> + * Our CPU scheduler assume all cpus in the same physical cpu package
> + * are assigned the same node. But, Buggy ACPI table or NUMA emulation
> + * might assigne them to different node. Fix it.
typo
> + */
> + if (node1 != node2) {
> + pr_warning("CPU %d in node %d and CPU %d in node %d are in the same physical CPU. forcing same node %d\n",
> + cpu1, node1, cpu2, node2, node2);
> +
> + numa_set_node(cpu1, node2);
> + cpumask_set_cpu(cpu1, node_to_cpumask_map[node2]);
> + cpumask_clear_cpu(cpu1, node_to_cpumask_map[node1]);
Maybe what you want is the following?
numa_remove_cpu(cpu1);
numa_set_node(cpu1, node2)
numa_add_cpu(cpu1)
Thanks.
--
tejun
--
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