* [PATCH] x86, UV: blade-local memory
@ 2009-07-27 14:35 ` Jack Steiner
0 siblings, 0 replies; 3+ messages in thread
From: Jack Steiner @ 2009-07-27 14:35 UTC (permalink / raw)
To: mingo, tglx; +Cc: linux-mm, linux-kernel
UV blades may not have any blade-local memory. Add a field (nid) to the UV
blade structure to indicates whether the node has local memory.
This is needed by the GRU driver (pushed separately).
Signed-off-by: Jack Steiner <steiner@sgi.com>
---
arch/x86/include/asm/uv/uv_hub.h | 7 +++++++
arch/x86/kernel/apic/x2apic_uv_x.c | 5 +++++
2 files changed, 12 insertions(+)
Index: linux/arch/x86/include/asm/uv/uv_hub.h
===================================================================
--- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2009-07-23 09:17:15.000000000 -0500
+++ linux/arch/x86/include/asm/uv/uv_hub.h 2009-07-23 09:44:41.000000000 -0500
@@ -327,6 +327,7 @@ struct uv_blade_info {
unsigned short nr_possible_cpus;
unsigned short nr_online_cpus;
unsigned short pnode;
+ short memory_nid;
};
extern struct uv_blade_info *uv_blade_info;
extern short *uv_node_to_blade;
@@ -363,6 +364,12 @@ static inline int uv_blade_to_pnode(int
return uv_blade_info[bid].pnode;
}
+/* Nid of memory node on blade. -1 if no blade-local memory */
+static inline int uv_blade_to_memory_nid(int bid)
+{
+ return uv_blade_info[bid].memory_nid;
+}
+
/* Determine the number of possible cpus on a blade */
static inline int uv_blade_nr_possible_cpus(int bid)
{
Index: linux/arch/x86/kernel/apic/x2apic_uv_x.c
===================================================================
--- linux.orig/arch/x86/kernel/apic/x2apic_uv_x.c 2009-07-23 09:17:15.000000000 -0500
+++ linux/arch/x86/kernel/apic/x2apic_uv_x.c 2009-07-23 09:44:41.000000000 -0500
@@ -592,6 +592,8 @@ void __init uv_system_init(void)
bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades();
uv_blade_info = kmalloc(bytes, GFP_KERNEL);
BUG_ON(!uv_blade_info);
+ for (blade = 0; blade < uv_num_possible_blades(); blade++)
+ uv_blade_info[blade].memory_nid = -1;
get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size);
@@ -630,6 +632,9 @@ void __init uv_system_init(void)
lcpu = uv_blade_info[blade].nr_possible_cpus;
uv_blade_info[blade].nr_possible_cpus++;
+ /* Any node on the blade, else will contain -1. */
+ uv_blade_info[blade].memory_nid = nid;
+
uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base;
uv_cpu_hub_info(cpu)->lowmem_remap_top = lowmem_redir_size;
uv_cpu_hub_info(cpu)->m_val = m_val;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] x86, UV: blade-local memory
@ 2009-07-27 14:35 ` Jack Steiner
0 siblings, 0 replies; 3+ messages in thread
From: Jack Steiner @ 2009-07-27 14:35 UTC (permalink / raw)
To: mingo, tglx; +Cc: linux-mm, linux-kernel
UV blades may not have any blade-local memory. Add a field (nid) to the UV
blade structure to indicates whether the node has local memory.
This is needed by the GRU driver (pushed separately).
Signed-off-by: Jack Steiner <steiner@sgi.com>
---
arch/x86/include/asm/uv/uv_hub.h | 7 +++++++
arch/x86/kernel/apic/x2apic_uv_x.c | 5 +++++
2 files changed, 12 insertions(+)
Index: linux/arch/x86/include/asm/uv/uv_hub.h
===================================================================
--- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2009-07-23 09:17:15.000000000 -0500
+++ linux/arch/x86/include/asm/uv/uv_hub.h 2009-07-23 09:44:41.000000000 -0500
@@ -327,6 +327,7 @@ struct uv_blade_info {
unsigned short nr_possible_cpus;
unsigned short nr_online_cpus;
unsigned short pnode;
+ short memory_nid;
};
extern struct uv_blade_info *uv_blade_info;
extern short *uv_node_to_blade;
@@ -363,6 +364,12 @@ static inline int uv_blade_to_pnode(int
return uv_blade_info[bid].pnode;
}
+/* Nid of memory node on blade. -1 if no blade-local memory */
+static inline int uv_blade_to_memory_nid(int bid)
+{
+ return uv_blade_info[bid].memory_nid;
+}
+
/* Determine the number of possible cpus on a blade */
static inline int uv_blade_nr_possible_cpus(int bid)
{
Index: linux/arch/x86/kernel/apic/x2apic_uv_x.c
===================================================================
--- linux.orig/arch/x86/kernel/apic/x2apic_uv_x.c 2009-07-23 09:17:15.000000000 -0500
+++ linux/arch/x86/kernel/apic/x2apic_uv_x.c 2009-07-23 09:44:41.000000000 -0500
@@ -592,6 +592,8 @@ void __init uv_system_init(void)
bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades();
uv_blade_info = kmalloc(bytes, GFP_KERNEL);
BUG_ON(!uv_blade_info);
+ for (blade = 0; blade < uv_num_possible_blades(); blade++)
+ uv_blade_info[blade].memory_nid = -1;
get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size);
@@ -630,6 +632,9 @@ void __init uv_system_init(void)
lcpu = uv_blade_info[blade].nr_possible_cpus;
uv_blade_info[blade].nr_possible_cpus++;
+ /* Any node on the blade, else will contain -1. */
+ uv_blade_info[blade].memory_nid = nid;
+
uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base;
uv_cpu_hub_info(cpu)->lowmem_remap_top = lowmem_redir_size;
uv_cpu_hub_info(cpu)->m_val = m_val;
--
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] 3+ messages in thread
* [tip:x86/urgent] x86, UV: Handle missing blade-local memory correctly
2009-07-27 14:35 ` Jack Steiner
(?)
@ 2009-08-04 15:31 ` tip-bot for Jack Steiner
-1 siblings, 0 replies; 3+ messages in thread
From: tip-bot for Jack Steiner @ 2009-08-04 15:31 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, steiner, tglx, mingo
Commit-ID: 6c7184b77464261b7d55583a48accbd1350923a3
Gitweb: http://git.kernel.org/tip/6c7184b77464261b7d55583a48accbd1350923a3
Author: Jack Steiner <steiner@sgi.com>
AuthorDate: Mon, 27 Jul 2009 09:35:07 -0500
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 4 Aug 2009 16:18:01 +0200
x86, UV: Handle missing blade-local memory correctly
UV blades may not have any blade-local memory. Add a field
(nid) to the UV blade structure to indicates whether the node
has local memory. This is needed by the GRU driver (pushed
separately).
Signed-off-by: Jack Steiner <steiner@sgi.com>
Cc: linux-mm@kvack.org
LKML-Reference: <20090727143507.GA7006@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/include/asm/uv/uv_hub.h | 7 +++++++
arch/x86/kernel/apic/x2apic_uv_x.c | 5 +++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 341070f..a6dde05 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -327,6 +327,7 @@ struct uv_blade_info {
unsigned short nr_possible_cpus;
unsigned short nr_online_cpus;
unsigned short pnode;
+ short memory_nid;
};
extern struct uv_blade_info *uv_blade_info;
extern short *uv_node_to_blade;
@@ -363,6 +364,12 @@ static inline int uv_blade_to_pnode(int bid)
return uv_blade_info[bid].pnode;
}
+/* Nid of memory node on blade. -1 if no blade-local memory */
+static inline int uv_blade_to_memory_nid(int bid)
+{
+ return uv_blade_info[bid].memory_nid;
+}
+
/* Determine the number of possible cpus on a blade */
static inline int uv_blade_nr_possible_cpus(int bid)
{
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 096d19a..ad3f0a9 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -591,6 +591,8 @@ void __init uv_system_init(void)
bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades();
uv_blade_info = kmalloc(bytes, GFP_KERNEL);
BUG_ON(!uv_blade_info);
+ for (blade = 0; blade < uv_num_possible_blades(); blade++)
+ uv_blade_info[blade].memory_nid = -1;
get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size);
@@ -629,6 +631,9 @@ void __init uv_system_init(void)
lcpu = uv_blade_info[blade].nr_possible_cpus;
uv_blade_info[blade].nr_possible_cpus++;
+ /* Any node on the blade, else will contain -1. */
+ uv_blade_info[blade].memory_nid = nid;
+
uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base;
uv_cpu_hub_info(cpu)->lowmem_remap_top = lowmem_redir_size;
uv_cpu_hub_info(cpu)->m_val = m_val;
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-04 15:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-27 14:35 [PATCH] x86, UV: blade-local memory Jack Steiner
2009-07-27 14:35 ` Jack Steiner
2009-08-04 15:31 ` [tip:x86/urgent] x86, UV: Handle missing blade-local memory correctly tip-bot for Jack Steiner
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.