* [PATCH RESEND]mm/ia64: fix a node distance bug
@ 2012-09-06 7:18 ` wujianguo
0 siblings, 0 replies; 6+ messages in thread
From: wujianguo @ 2012-09-06 7:18 UTC (permalink / raw)
To: tony.luck, akpm, fenghua.yu
Cc: linux-ia64, linux-kernel, linux-mm, jiang.liu, guohanjun,
qiuxishi, wujianguo, wency
From: Jianguo Wu <wujianguo@huawei.com>
In arch ia64, has following definition:
extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
#define node_distance(from,to) (numa_slit[(from) * num_online_nodes() + (to)])
num_online_nodes() is a variable value, it can be changed after hot-remove/add
a node.
I my practice, I found node distance is wrong after offline
a node in IA64 platform. For example system has 4 nodes:
node distances:
node 0 1 2 3
0: 10 21 21 32
1: 21 10 32 21
2: 21 32 10 21
3: 32 21 21 10
linux-drf:/sys/devices/system/node/node0 # cat distance
10 21 21 32
linux-drf:/sys/devices/system/node/node1 # cat distance
21 10 32 21
After offline node2:
linux-drf:/sys/devices/system/node/node0 # cat distance
10 21 32
linux-drf:/sys/devices/system/node/node1 # cat distance
32 21 32 --------->expected value is: 21 10 21
Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
---
arch/ia64/include/asm/numa.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/ia64/include/asm/numa.h b/arch/ia64/include/asm/numa.h
index 6a8a27c..2e27ef1 100644
--- a/arch/ia64/include/asm/numa.h
+++ b/arch/ia64/include/asm/numa.h
@@ -59,7 +59,7 @@ extern struct node_cpuid_s node_cpuid[NR_CPUS];
*/
extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
-#define node_distance(from,to) (numa_slit[(from) * num_online_nodes() + (to)])
+#define node_distance(from,to) (numa_slit[(from) * MAX_NUMNODES + (to)])
extern int paddr_to_nid(unsigned long paddr);
-- 1.7.6.1 .
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH RESEND]mm/ia64: fix a node distance bug
@ 2012-09-06 7:18 ` wujianguo
0 siblings, 0 replies; 6+ messages in thread
From: wujianguo @ 2012-09-06 7:18 UTC (permalink / raw)
To: tony.luck, akpm, fenghua.yu
Cc: linux-ia64, linux-kernel, linux-mm, jiang.liu, guohanjun,
qiuxishi, wujianguo, wency
From: Jianguo Wu <wujianguo@huawei.com>
In arch ia64, has following definition:
extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
#define node_distance(from,to) (numa_slit[(from) * num_online_nodes() + (to)])
num_online_nodes() is a variable value, it can be changed after hot-remove/add
a node.
I my practice, I found node distance is wrong after offline
a node in IA64 platform. For example system has 4 nodes:
node distances:
node 0 1 2 3
0: 10 21 21 32
1: 21 10 32 21
2: 21 32 10 21
3: 32 21 21 10
linux-drf:/sys/devices/system/node/node0 # cat distance
10 21 21 32
linux-drf:/sys/devices/system/node/node1 # cat distance
21 10 32 21
After offline node2:
linux-drf:/sys/devices/system/node/node0 # cat distance
10 21 32
linux-drf:/sys/devices/system/node/node1 # cat distance
32 21 32 --------->expected value is: 21 10 21
Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
---
arch/ia64/include/asm/numa.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/ia64/include/asm/numa.h b/arch/ia64/include/asm/numa.h
index 6a8a27c..2e27ef1 100644
--- a/arch/ia64/include/asm/numa.h
+++ b/arch/ia64/include/asm/numa.h
@@ -59,7 +59,7 @@ extern struct node_cpuid_s node_cpuid[NR_CPUS];
*/
extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
-#define node_distance(from,to) (numa_slit[(from) * num_online_nodes() + (to)])
+#define node_distance(from,to) (numa_slit[(from) * MAX_NUMNODES + (to)])
extern int paddr_to_nid(unsigned long paddr);
-- 1.7.6.1 .
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND]mm/ia64: fix a node distance bug
2012-09-06 7:18 ` wujianguo
@ 2012-09-07 22:58 ` David Rientjes
-1 siblings, 0 replies; 6+ messages in thread
From: David Rientjes @ 2012-09-07 22:58 UTC (permalink / raw)
To: wujianguo
Cc: tony.luck, akpm, fenghua.yu, linux-ia64, linux-kernel, linux-mm,
jiang.liu, guohanjun, qiuxishi, wujianguo, wency
On Thu, 6 Sep 2012, wujianguo wrote:
> From: Jianguo Wu <wujianguo@huawei.com>
>
> In arch ia64, has following definition:
> extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
> #define node_distance(from,to) (numa_slit[(from) * num_online_nodes() + (to)])
>
> num_online_nodes() is a variable value, it can be changed after hot-remove/add
> a node.
>
> I my practice, I found node distance is wrong after offline
> a node in IA64 platform. For example system has 4 nodes:
> node distances:
> node 0 1 2 3
> 0: 10 21 21 32
> 1: 21 10 32 21
> 2: 21 32 10 21
> 3: 32 21 21 10
>
> linux-drf:/sys/devices/system/node/node0 # cat distance
> 10 21 21 32
> linux-drf:/sys/devices/system/node/node1 # cat distance
> 21 10 32 21
>
> After offline node2:
> linux-drf:/sys/devices/system/node/node0 # cat distance
> 10 21 32
> linux-drf:/sys/devices/system/node/node1 # cat distance
> 32 21 32 --------->expected value is: 21 10 21
>
>
> Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: David Rientjes <rientjes@google.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND]mm/ia64: fix a node distance bug
@ 2012-09-07 22:58 ` David Rientjes
0 siblings, 0 replies; 6+ messages in thread
From: David Rientjes @ 2012-09-07 22:58 UTC (permalink / raw)
To: wujianguo
Cc: tony.luck, akpm, fenghua.yu, linux-ia64, linux-kernel, linux-mm,
jiang.liu, guohanjun, qiuxishi, wujianguo, wency
On Thu, 6 Sep 2012, wujianguo wrote:
> From: Jianguo Wu <wujianguo@huawei.com>
>
> In arch ia64, has following definition:
> extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
> #define node_distance(from,to) (numa_slit[(from) * num_online_nodes() + (to)])
>
> num_online_nodes() is a variable value, it can be changed after hot-remove/add
> a node.
>
> I my practice, I found node distance is wrong after offline
> a node in IA64 platform. For example system has 4 nodes:
> node distances:
> node 0 1 2 3
> 0: 10 21 21 32
> 1: 21 10 32 21
> 2: 21 32 10 21
> 3: 32 21 21 10
>
> linux-drf:/sys/devices/system/node/node0 # cat distance
> 10 21 21 32
> linux-drf:/sys/devices/system/node/node1 # cat distance
> 21 10 32 21
>
> After offline node2:
> linux-drf:/sys/devices/system/node/node0 # cat distance
> 10 21 32
> linux-drf:/sys/devices/system/node/node1 # cat distance
> 32 21 32 --------->expected value is: 21 10 21
>
>
> Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: David Rientjes <rientjes@google.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND]mm/ia64: fix a node distance bug
2012-09-07 22:58 ` David Rientjes
@ 2012-09-10 21:40 ` Tony Luck
-1 siblings, 0 replies; 6+ messages in thread
From: Tony Luck @ 2012-09-10 21:40 UTC (permalink / raw)
To: David Rientjes
Cc: wujianguo, akpm, fenghua.yu, linux-ia64, linux-kernel, linux-mm,
jiang.liu, guohanjun, qiuxishi, wujianguo, wency
On Fri, Sep 7, 2012 at 3:58 PM, David Rientjes <rientjes@google.com> wrote:
> On Thu, 6 Sep 2012, wujianguo wrote:
>> Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>
> Acked-by: David Rientjes <rientjes@google.com>
Applied (should show up in linux-next in the next day or two).
-Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND]mm/ia64: fix a node distance bug
@ 2012-09-10 21:40 ` Tony Luck
0 siblings, 0 replies; 6+ messages in thread
From: Tony Luck @ 2012-09-10 21:40 UTC (permalink / raw)
To: David Rientjes
Cc: wujianguo, akpm, fenghua.yu, linux-ia64, linux-kernel, linux-mm,
jiang.liu, guohanjun, qiuxishi, wujianguo, wency
On Fri, Sep 7, 2012 at 3:58 PM, David Rientjes <rientjes@google.com> wrote:
> On Thu, 6 Sep 2012, wujianguo wrote:
>> Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>
> Acked-by: David Rientjes <rientjes@google.com>
Applied (should show up in linux-next in the next day or two).
-Tony
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-10 21:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-06 7:18 [PATCH RESEND]mm/ia64: fix a node distance bug wujianguo
2012-09-06 7:18 ` wujianguo
2012-09-07 22:58 ` David Rientjes
2012-09-07 22:58 ` David Rientjes
2012-09-10 21:40 ` Tony Luck
2012-09-10 21:40 ` Tony Luck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.