[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D5C4538.7060403@gmail.com>
Date: Thu, 17 Feb 2011 00:44:24 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Yinghai Lu <yinghai@...nel.org>
CC: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
"H. Peter Anvin" <hpa@...or.com>, Tejun Heo <tj@...nel.org>,
David Rientjes <rientjes@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86, numa: seperate alloc_numa_distance from numa_reset_distance.
On 02/16/2011 11:57 PM, Yinghai Lu wrote:
>
> alloc code is much bigger the setting self.
>
...
> +
> + numa_distance = __va(phys);
> + numa_distance_cnt = cnt;
> +
> + /* fill with the default distances */
> + for (i = 0; i< cnt; i++)
> + for (j = 0; j< cnt; j++)
> + numa_distance[i * cnt + j] = i == j ?
> + LOCAL_DISTANCE : REMOTE_DISTANCE;
> + printk(KERN_DEBUG "NUMA: Initialized distance table, cnt=%d\n", cnt);
> +}
> +
Hi Yinghai, btw would it be convenient to use node_distance() helper here
(since this snippet is touched anyway and there is a big merging of numa
code), ie
/* fill with the default distances */
for (i = 0; i < cnt; i++)
for (j = 0; j < cnt; j++)
numa_distance[i * cnt + j] = node_distance(i, j);
though it should be patch on top of yours to not mix with plain code move
--
Cyrill
--
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