public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix topology initialization
@ 2003-10-17 17:48 Jesse Barnes
  2003-10-17 17:50 ` Jesse Barnes
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Jesse Barnes @ 2003-10-17 17:48 UTC (permalink / raw)
  To: linux-ia64

Now that NUMA kernels are working we can properly initialze the topology
information so that /sys/devices/system/node* & friends aren't empty.

In doing this I found some circular dependencies, so I removed
nodedata.h and did some forward declarations because I figured cleaning
them up properly is something that can wait until after 2.6.

Jesse


diff -Nru a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
--- a/arch/ia64/mm/numa.c	Fri Oct 17 10:45:09 2003
+++ b/arch/ia64/mm/numa.c	Fri Oct 17 10:45:09 2003
@@ -11,12 +11,20 @@
  */
 
 #include <linux/config.h>
+#include <linux/cpu.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/memblk.h>
+#include <linux/node.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
+#include <linux/topology.h>
 #include <asm/numa.h>
 
+struct memblk *sysfs_memblks;;
+struct node *sysfs_nodes;
+struct cpu *sysfs_cpus;
+
 /*
  * The following structures are usually initialized by ACPI or
  * similar mechanisms and describe the NUMA characteristics of the machine.
@@ -43,3 +51,42 @@
 
 	return (i < num_memblks) ? node_memblk[i].nid : (num_memblks ? -1 : 0);
 }
+
+int __init topology_init(void)
+{
+	int i, err = 0;
+
+	sysfs_nodes = kmalloc(sizeof(struct node) * numnodes, GFP_KERNEL);
+	if (!sysfs_nodes)
+		return -ENOMEM;
+
+	sysfs_memblks = kmalloc(sizeof(struct memblk) * num_memblks,
+				GFP_KERNEL);
+	if (!sysfs_memblks) {
+		kfree(sysfs_nodes);
+		return -ENOMEM;
+	}
+
+	sysfs_cpus = kmalloc(sizeof(struct cpu) * NR_CPUS, GFP_KERNEL);
+	if (!sysfs_cpus) {
+		kfree(sysfs_memblks);
+		kfree(sysfs_nodes);
+		return -ENOMEM;
+	}
+
+	for (i = 0; i < numnodes; i++)
+		err = register_node(&sysfs_nodes[i], i, 0);
+
+	for (i = 0; i < num_memblks; i++)
+		err = register_memblk(&sysfs_memblks[i], i,
+				      &sysfs_nodes[memblk_to_node(i)]);
+
+	for (i = 0; i < NR_CPUS; i++)
+		if (cpu_online(i))
+			err = register_cpu(&sysfs_cpus[i], i,
+					   &sysfs_nodes[cpu_to_node(i)]);
+
+	return err;
+}
+
+__initcall(topology_init);
diff -Nru a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c
--- a/arch/ia64/sn/kernel/bte.c	Fri Oct 17 10:45:09 2003
+++ b/arch/ia64/sn/kernel/bte.c	Fri Oct 17 10:45:09 2003
@@ -39,7 +39,7 @@
 #include <asm/sn/sn_cpuid.h>
 #include <asm/sn/pda.h>
 #include <asm/sn/sn2/shubio.h>
-#include <asm/nodedata.h>
+#include <asm/mmzone.h>
 
 #include <linux/bootmem.h>
 #include <linux/string.h>
diff -Nru a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h
--- a/include/asm-ia64/mmzone.h	Fri Oct 17 10:45:09 2003
+++ b/include/asm-ia64/mmzone.h	Fri Oct 17 10:45:09 2003
@@ -12,8 +12,9 @@
 #define _ASM_IA64_MMZONE_H
 
 #include <linux/config.h>
-#include <asm/page.h>
 #include <asm/meminit.h>
+#include <asm/page.h>
+#include <asm/percpu.h>
 
 #ifdef CONFIG_DISCONTIGMEM
 
@@ -32,6 +33,15 @@
 #define pfn_valid(pfn)		(((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
 #define page_to_pfn(page)	((unsigned long) (page - vmem_map))
 #define pfn_to_page(pfn)	(vmem_map + (pfn))
+
+struct ia64_node_data {
+	short			active_cpu_count;
+	short			node;
+	struct pglist_data	*pg_data_ptrs[NR_NODES];
+};
+
+#define local_node_data		(local_cpu_data->node_data)
+#define NODE_DATA(nid)		(local_node_data->pg_data_ptrs[nid])
 
 #endif /* CONFIG_DISCONTIGMEM */
 #endif /* _ASM_IA64_MMZONE_H */
diff -Nru a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h
--- a/include/asm-ia64/nodedata.h	Fri Oct 17 10:45:09 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,52 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (c) 2000 Silicon Graphics, Inc.  All rights reserved.
- * Copyright (c) 2002 NEC Corp.
- * Copyright (c) 2002 Erich Focht <efocht@ess.nec.de>
- * Copyright (c) 2002 Kimio Suganuma <k-suganuma@da.jp.nec.com>
- */
-#ifndef _ASM_IA64_NODEDATA_H
-#define _ASM_IA64_NODEDATA_H
-
-#include <linux/config.h>
-#include <linux/numa.h>
-
-#include <asm/percpu.h>
-#include <asm/mmzone.h>
-
-#ifdef CONFIG_DISCONTIGMEM
-
-/*
- * Node Data. One of these structures is located on each node of a NUMA system.
- */
-
-struct pglist_data;
-struct ia64_node_data {
-	short			active_cpu_count;
-	short			node;
-	struct pglist_data	*pg_data_ptrs[NR_NODES];
-};
-
-
-/*
- * Return a pointer to the node_data structure for the executing cpu.
- */
-#define local_node_data		(local_cpu_data->node_data)
-
-/*
- * Given a node id, return a pointer to the pg_data_t for the node.
- *
- * NODE_DATA 	- should be used in all code not related to system
- *		  initialization. It uses pernode data structures to minimize
- *		  offnode memory references. However, these structure are not 
- *		  present during boot. This macro can be used once cpu_init
- *		  completes.
- */
-#define NODE_DATA(nid)		(local_node_data->pg_data_ptrs[nid])
-
-#endif /* CONFIG_DISCONTIGMEM */
-
-#endif /* _ASM_IA64_NODEDATA_H */
diff -Nru a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
--- a/include/asm-ia64/processor.h	Fri Oct 17 10:45:09 2003
+++ b/include/asm-ia64/processor.h	Fri Oct 17 10:45:09 2003
@@ -95,9 +95,6 @@
 #include <asm/rse.h>
 #include <asm/unwind.h>
 #include <asm/atomic.h>
-#ifdef CONFIG_NUMA
-#include <asm/nodedata.h>
-#endif
 
 /* like above but expressed as bitfields for more efficient access: */
 struct ia64_psr {
diff -Nru a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h
--- a/include/asm-ia64/sn/sn_cpuid.h	Fri Oct 17 10:45:09 2003
+++ b/include/asm-ia64/sn/sn_cpuid.h	Fri Oct 17 10:45:09 2003
@@ -17,7 +17,6 @@
 #include <linux/mmzone.h>
 #include <asm/sn/types.h>
 #include <asm/current.h>
-#include <asm/nodedata.h>
 #include <asm/sn/pda.h>
 
 
diff -Nru a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h
--- a/include/asm-ia64/topology.h	Fri Oct 17 10:45:09 2003
+++ b/include/asm-ia64/topology.h	Fri Oct 17 10:45:09 2003
@@ -13,6 +13,7 @@
 #ifndef _ASM_IA64_TOPOLOGY_H
 #define _ASM_IA64_TOPOLOGY_H
 
+#include <linux/config.h>
 #include <asm/acpi.h>
 #include <asm/numa.h>
 #include <asm/smp.h>
@@ -63,5 +64,12 @@
 #endif /* CONFIG_NUMA */
 
 #include <asm-generic/topology.h>
+
+struct memblk;
+struct node;
+struct cpu;
+extern struct memblk *sysfs_memblks;
+extern struct node *sysfs_nodes;
+extern struct cpu *sysfs_cpus;
 
 #endif /* _ASM_IA64_TOPOLOGY_H */

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fix topology initialization
  2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
@ 2003-10-17 17:50 ` Jesse Barnes
  2003-10-17 18:05 ` Christoph Hellwig
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jesse Barnes @ 2003-10-17 17:50 UTC (permalink / raw)
  To: linux-ia64

Please ignore this bogus patch.  I'll resend in a minute w/o all the
unnecessary crap.

Thanks,
Jesse

On Fri, Oct 17, 2003 at 10:48:34AM -0700, jbarnes wrote:
> Now that NUMA kernels are working we can properly initialze the topology
> information so that /sys/devices/system/node* & friends aren't empty.
> 
> In doing this I found some circular dependencies, so I removed
> nodedata.h and did some forward declarations because I figured cleaning
> them up properly is something that can wait until after 2.6.
> 
> Jesse
> 
> 
> diff -Nru a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
> --- a/arch/ia64/mm/numa.c	Fri Oct 17 10:45:09 2003
> +++ b/arch/ia64/mm/numa.c	Fri Oct 17 10:45:09 2003
> @@ -11,12 +11,20 @@
>   */
>  
>  #include <linux/config.h>
> +#include <linux/cpu.h>
>  #include <linux/kernel.h>
>  #include <linux/mm.h>
> +#include <linux/memblk.h>
> +#include <linux/node.h>
>  #include <linux/init.h>
>  #include <linux/bootmem.h>
> +#include <linux/topology.h>
>  #include <asm/numa.h>
>  
> +struct memblk *sysfs_memblks;;
> +struct node *sysfs_nodes;
> +struct cpu *sysfs_cpus;
> +
>  /*
>   * The following structures are usually initialized by ACPI or
>   * similar mechanisms and describe the NUMA characteristics of the machine.
> @@ -43,3 +51,42 @@
>  
>  	return (i < num_memblks) ? node_memblk[i].nid : (num_memblks ? -1 : 0);
>  }
> +
> +int __init topology_init(void)
> +{
> +	int i, err = 0;
> +
> +	sysfs_nodes = kmalloc(sizeof(struct node) * numnodes, GFP_KERNEL);
> +	if (!sysfs_nodes)
> +		return -ENOMEM;
> +
> +	sysfs_memblks = kmalloc(sizeof(struct memblk) * num_memblks,
> +				GFP_KERNEL);
> +	if (!sysfs_memblks) {
> +		kfree(sysfs_nodes);
> +		return -ENOMEM;
> +	}
> +
> +	sysfs_cpus = kmalloc(sizeof(struct cpu) * NR_CPUS, GFP_KERNEL);
> +	if (!sysfs_cpus) {
> +		kfree(sysfs_memblks);
> +		kfree(sysfs_nodes);
> +		return -ENOMEM;
> +	}
> +
> +	for (i = 0; i < numnodes; i++)
> +		err = register_node(&sysfs_nodes[i], i, 0);
> +
> +	for (i = 0; i < num_memblks; i++)
> +		err = register_memblk(&sysfs_memblks[i], i,
> +				      &sysfs_nodes[memblk_to_node(i)]);
> +
> +	for (i = 0; i < NR_CPUS; i++)
> +		if (cpu_online(i))
> +			err = register_cpu(&sysfs_cpus[i], i,
> +					   &sysfs_nodes[cpu_to_node(i)]);
> +
> +	return err;
> +}
> +
> +__initcall(topology_init);
> diff -Nru a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c
> --- a/arch/ia64/sn/kernel/bte.c	Fri Oct 17 10:45:09 2003
> +++ b/arch/ia64/sn/kernel/bte.c	Fri Oct 17 10:45:09 2003
> @@ -39,7 +39,7 @@
>  #include <asm/sn/sn_cpuid.h>
>  #include <asm/sn/pda.h>
>  #include <asm/sn/sn2/shubio.h>
> -#include <asm/nodedata.h>
> +#include <asm/mmzone.h>
>  
>  #include <linux/bootmem.h>
>  #include <linux/string.h>
> diff -Nru a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h
> --- a/include/asm-ia64/mmzone.h	Fri Oct 17 10:45:09 2003
> +++ b/include/asm-ia64/mmzone.h	Fri Oct 17 10:45:09 2003
> @@ -12,8 +12,9 @@
>  #define _ASM_IA64_MMZONE_H
>  
>  #include <linux/config.h>
> -#include <asm/page.h>
>  #include <asm/meminit.h>
> +#include <asm/page.h>
> +#include <asm/percpu.h>
>  
>  #ifdef CONFIG_DISCONTIGMEM
>  
> @@ -32,6 +33,15 @@
>  #define pfn_valid(pfn)		(((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
>  #define page_to_pfn(page)	((unsigned long) (page - vmem_map))
>  #define pfn_to_page(pfn)	(vmem_map + (pfn))
> +
> +struct ia64_node_data {
> +	short			active_cpu_count;
> +	short			node;
> +	struct pglist_data	*pg_data_ptrs[NR_NODES];
> +};
> +
> +#define local_node_data		(local_cpu_data->node_data)
> +#define NODE_DATA(nid)		(local_node_data->pg_data_ptrs[nid])
>  
>  #endif /* CONFIG_DISCONTIGMEM */
>  #endif /* _ASM_IA64_MMZONE_H */
> diff -Nru a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h
> --- a/include/asm-ia64/nodedata.h	Fri Oct 17 10:45:09 2003
> +++ /dev/null	Wed Dec 31 16:00:00 1969
> @@ -1,52 +0,0 @@
> -/*
> - * This file is subject to the terms and conditions of the GNU General Public
> - * License.  See the file "COPYING" in the main directory of this archive
> - * for more details.
> - *
> - * Copyright (c) 2000 Silicon Graphics, Inc.  All rights reserved.
> - * Copyright (c) 2002 NEC Corp.
> - * Copyright (c) 2002 Erich Focht <efocht@ess.nec.de>
> - * Copyright (c) 2002 Kimio Suganuma <k-suganuma@da.jp.nec.com>
> - */
> -#ifndef _ASM_IA64_NODEDATA_H
> -#define _ASM_IA64_NODEDATA_H
> -
> -#include <linux/config.h>
> -#include <linux/numa.h>
> -
> -#include <asm/percpu.h>
> -#include <asm/mmzone.h>
> -
> -#ifdef CONFIG_DISCONTIGMEM
> -
> -/*
> - * Node Data. One of these structures is located on each node of a NUMA system.
> - */
> -
> -struct pglist_data;
> -struct ia64_node_data {
> -	short			active_cpu_count;
> -	short			node;
> -	struct pglist_data	*pg_data_ptrs[NR_NODES];
> -};
> -
> -
> -/*
> - * Return a pointer to the node_data structure for the executing cpu.
> - */
> -#define local_node_data		(local_cpu_data->node_data)
> -
> -/*
> - * Given a node id, return a pointer to the pg_data_t for the node.
> - *
> - * NODE_DATA 	- should be used in all code not related to system
> - *		  initialization. It uses pernode data structures to minimize
> - *		  offnode memory references. However, these structure are not 
> - *		  present during boot. This macro can be used once cpu_init
> - *		  completes.
> - */
> -#define NODE_DATA(nid)		(local_node_data->pg_data_ptrs[nid])
> -
> -#endif /* CONFIG_DISCONTIGMEM */
> -
> -#endif /* _ASM_IA64_NODEDATA_H */
> diff -Nru a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
> --- a/include/asm-ia64/processor.h	Fri Oct 17 10:45:09 2003
> +++ b/include/asm-ia64/processor.h	Fri Oct 17 10:45:09 2003
> @@ -95,9 +95,6 @@
>  #include <asm/rse.h>
>  #include <asm/unwind.h>
>  #include <asm/atomic.h>
> -#ifdef CONFIG_NUMA
> -#include <asm/nodedata.h>
> -#endif
>  
>  /* like above but expressed as bitfields for more efficient access: */
>  struct ia64_psr {
> diff -Nru a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h
> --- a/include/asm-ia64/sn/sn_cpuid.h	Fri Oct 17 10:45:09 2003
> +++ b/include/asm-ia64/sn/sn_cpuid.h	Fri Oct 17 10:45:09 2003
> @@ -17,7 +17,6 @@
>  #include <linux/mmzone.h>
>  #include <asm/sn/types.h>
>  #include <asm/current.h>
> -#include <asm/nodedata.h>
>  #include <asm/sn/pda.h>
>  
>  
> diff -Nru a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h
> --- a/include/asm-ia64/topology.h	Fri Oct 17 10:45:09 2003
> +++ b/include/asm-ia64/topology.h	Fri Oct 17 10:45:09 2003
> @@ -13,6 +13,7 @@
>  #ifndef _ASM_IA64_TOPOLOGY_H
>  #define _ASM_IA64_TOPOLOGY_H
>  
> +#include <linux/config.h>
>  #include <asm/acpi.h>
>  #include <asm/numa.h>
>  #include <asm/smp.h>
> @@ -63,5 +64,12 @@
>  #endif /* CONFIG_NUMA */
>  
>  #include <asm-generic/topology.h>
> +
> +struct memblk;
> +struct node;
> +struct cpu;
> +extern struct memblk *sysfs_memblks;
> +extern struct node *sysfs_nodes;
> +extern struct cpu *sysfs_cpus;
>  
>  #endif /* _ASM_IA64_TOPOLOGY_H */

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fix topology initialization
  2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
  2003-10-17 17:50 ` Jesse Barnes
@ 2003-10-17 18:05 ` Christoph Hellwig
  2003-10-17 18:27 ` Jesse Barnes
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Christoph Hellwig @ 2003-10-17 18:05 UTC (permalink / raw)
  To: linux-ia64

On Fri, Oct 17, 2003 at 10:48:34AM -0700, Jesse Barnes wrote:
> Now that NUMA kernels are working we can properly initialze the topology
> information so that /sys/devices/system/node* & friends aren't empty.

So with a proper topology API we can start to kill off the topology-related
hwgfs mess?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fix topology initialization
  2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
  2003-10-17 17:50 ` Jesse Barnes
  2003-10-17 18:05 ` Christoph Hellwig
@ 2003-10-17 18:27 ` Jesse Barnes
  2003-10-17 18:34 ` Martin K. Petersen
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jesse Barnes @ 2003-10-17 18:27 UTC (permalink / raw)
  To: linux-ia64

On Fri, Oct 17, 2003 at 07:05:11PM +0100, Christoph Hellwig wrote:
> On Fri, Oct 17, 2003 at 10:48:34AM -0700, Jesse Barnes wrote:
> > Now that NUMA kernels are working we can properly initialze the topology
> > information so that /sys/devices/system/node* & friends aren't empty.
> 
> So with a proper topology API we can start to kill off the topology-related
> hwgfs mess?

I think this will provide some of the info that hwgfs provides, but not
all.  We still need a way to map PCI busses to nodes (or cpumasks,
whatever makes sense) and a way to map nodes & busses to physical, rack
mounted bricks.

Jesse

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fix topology initialization
  2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
                   ` (2 preceding siblings ...)
  2003-10-17 18:27 ` Jesse Barnes
@ 2003-10-17 18:34 ` Martin K. Petersen
  2003-10-17 18:37 ` Christoph Hellwig
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2003-10-17 18:34 UTC (permalink / raw)
  To: linux-ia64

>>>>> "Christoph" = Christoph Hellwig <hch@infradead.org> writes:

Christoph> On Fri, Oct 17, 2003 at 10:48:34AM -0700, Jesse Barnes wrote:
>> Now that NUMA kernels are working we can properly initialze the
>> topology information so that /sys/devices/system/node* & friends
>> aren't empty.

Christoph> So with a proper topology API we can start to kill off the
Christoph> topology-related hwgfs mess?

We're working on it...

-- 
Martin K. Petersen	Silicon Graphics, Inc.
mkp@sgi.com		http://www.sgi.com/



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fix topology initialization
  2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
                   ` (3 preceding siblings ...)
  2003-10-17 18:34 ` Martin K. Petersen
@ 2003-10-17 18:37 ` Christoph Hellwig
  2003-10-17 18:51 ` Martin K. Petersen
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Christoph Hellwig @ 2003-10-17 18:37 UTC (permalink / raw)
  To: linux-ia64

On Fri, Oct 17, 2003 at 11:27:07AM -0700, Jesse Barnes wrote:
> On Fri, Oct 17, 2003 at 07:05:11PM +0100, Christoph Hellwig wrote:
> > On Fri, Oct 17, 2003 at 10:48:34AM -0700, Jesse Barnes wrote:
> > > Now that NUMA kernels are working we can properly initialze the topology
> > > information so that /sys/devices/system/node* & friends aren't empty.
> > 
> > So with a proper topology API we can start to kill off the topology-related
> > hwgfs mess?
> 
> I think this will provide some of the info that hwgfs provides, but not
> all.  We still need a way to map PCI busses to nodes (or cpumasks,
> whatever makes sense)

We should have this in the topology API already in a generic fashion.  Do you
need it in userland aswell?

> and a way to map nodes & busses to physical, rack mounted bricks.

Well, that's a SN-specific thing.  But it could be implemented similar to the
current toplogy API.  What do you actually need this for?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fix topology initialization
  2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
                   ` (4 preceding siblings ...)
  2003-10-17 18:37 ` Christoph Hellwig
@ 2003-10-17 18:51 ` Martin K. Petersen
  2003-10-17 19:22 ` Chen, Kenneth W
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2003-10-17 18:51 UTC (permalink / raw)
  To: linux-ia64

>>>>> "Christoph" = Christoph Hellwig <hch@infradead.org> writes:

>> I think this will provide some of the info that hwgfs provides, but
>> not all.  We still need a way to map PCI busses to nodes (or
>> cpumasks, whatever makes sense)

Matthew Dobson has worked on PCI affinity.  I'm on the road this week
and have not had a chance to test his latest patch on Altix yet.


Christoph> We should have this in the topology API already in a
Christoph> generic fashion.  Do you need it in userland aswell?

The tentative plan is to use libnuma to export the information to
application developers.


>> and a way to map nodes & busses to physical, rack mounted bricks.

Christoph> Well, that's a SN-specific thing.  But it could be
Christoph> implemented similar to the current toplogy API.  What do
Christoph> you actually need this for?

System administrator diagnostics.  We'll need to do this with
a set of SN2-specific utilities.

-- 
Martin K. Petersen	Silicon Graphics, Inc.
mkp@sgi.com		http://www.sgi.com/



^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH] fix topology initialization
  2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
                   ` (5 preceding siblings ...)
  2003-10-17 18:51 ` Martin K. Petersen
@ 2003-10-17 19:22 ` Chen, Kenneth W
  2003-10-17 20:33 ` Jesse Barnes
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Chen, Kenneth W @ 2003-10-17 19:22 UTC (permalink / raw)
  To: linux-ia64

Is there any libnuma code available somewhere (library, kernel patch,
etc)?


-----Original Message-----
From: linux-ia64-owner@vger.kernel.org
[mailto:linux-ia64-owner@vger.kernel.org] On Behalf Of Martin K.
Petersen
Sent: Friday, October 17, 2003 11:51 AM
To: Christoph Hellwig
Cc: davidm@hpl.hp.com; linux-ia64@vger.kernel.org
Subject: Re: [PATCH] fix topology initialization


>>>>> "Christoph" = Christoph Hellwig <hch@infradead.org> writes:

>> I think this will provide some of the info that hwgfs provides, but
>> not all.  We still need a way to map PCI busses to nodes (or
>> cpumasks, whatever makes sense)

Matthew Dobson has worked on PCI affinity.  I'm on the road this week
and have not had a chance to test his latest patch on Altix yet.


Christoph> We should have this in the topology API already in a
Christoph> generic fashion.  Do you need it in userland aswell?

The tentative plan is to use libnuma to export the information to
application developers.


>> and a way to map nodes & busses to physical, rack mounted bricks.

Christoph> Well, that's a SN-specific thing.  But it could be
Christoph> implemented similar to the current toplogy API.  What do
Christoph> you actually need this for?

System administrator diagnostics.  We'll need to do this with
a set of SN2-specific utilities.

-- 
Martin K. Petersen	Silicon Graphics, Inc.
mkp@sgi.com		http://www.sgi.com/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fix topology initialization
  2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
                   ` (6 preceding siblings ...)
  2003-10-17 19:22 ` Chen, Kenneth W
@ 2003-10-17 20:33 ` Jesse Barnes
  2003-10-20  8:43 ` Jes Sorensen
  2003-10-20 15:09 ` Martin K. Petersen
  9 siblings, 0 replies; 11+ messages in thread
From: Jesse Barnes @ 2003-10-17 20:33 UTC (permalink / raw)
  To: linux-ia64

On Fri, Oct 17, 2003 at 07:37:20PM +0100, Christoph Hellwig wrote:
> > I think this will provide some of the info that hwgfs provides, but not
> > all.  We still need a way to map PCI busses to nodes (or cpumasks,
> > whatever makes sense)
> 
> We should have this in the topology API already in a generic fashion.  Do you
> need it in userland aswell?

Yeah, it might be useful for a userland irq balancer for example.

> > and a way to map nodes & busses to physical, rack mounted bricks.
> 
> Well, that's a SN-specific thing.  But it could be implemented similar to the
> current toplogy API.  What do you actually need this for?

Well, I'm not sure that it should be in the kernel at all.  Maybe it
could just be a SAL call or something with a thin driver wrapper for a
userspace program to use.  It's mainly useful for physically locating
things, e.g.  'the PCI slot on this brick on this rack is dead'.

Jesse

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fix topology initialization
  2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
                   ` (7 preceding siblings ...)
  2003-10-17 20:33 ` Jesse Barnes
@ 2003-10-20  8:43 ` Jes Sorensen
  2003-10-20 15:09 ` Martin K. Petersen
  9 siblings, 0 replies; 11+ messages in thread
From: Jes Sorensen @ 2003-10-20  8:43 UTC (permalink / raw)
  To: linux-ia64

>>>>> "Kenneth" = Chen, Kenneth W <kenneth.w.chen@intel.com> writes:

Kenneth> Is there any libnuma code available somewhere (library,
Kenneth> kernel patch, etc)?

The closest pointer I can find off hand is this one:

http://lwn.net/Articles/32848/

Cheers,
Jes

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fix topology initialization
  2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
                   ` (8 preceding siblings ...)
  2003-10-20  8:43 ` Jes Sorensen
@ 2003-10-20 15:09 ` Martin K. Petersen
  9 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2003-10-20 15:09 UTC (permalink / raw)
  To: linux-ia64

>>>>> "Jes" = Jes Sorensen <jes@wildopensource.com> writes:

>>>>> "Kenneth" = Chen, Kenneth W <kenneth.w.chen@intel.com> writes:
Kenneth> Is there any libnuma code available somewhere (library,
Kenneth> kernel patch, etc)?

Jes> The closest pointer I can find off hand is this one:

Jes> http://lwn.net/Articles/32848/

Yeah, that's what I was thinking of.  There was some talk about
extending and embracing libnuma at the kernel summit.

Andi, where's the code hiding?

-- 
Martin K. Petersen	Wild Open Source, Inc.
mkp@wildopensource.com	http://www.wildopensource.com/


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-10-20 15:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-17 17:48 [PATCH] fix topology initialization Jesse Barnes
2003-10-17 17:50 ` Jesse Barnes
2003-10-17 18:05 ` Christoph Hellwig
2003-10-17 18:27 ` Jesse Barnes
2003-10-17 18:34 ` Martin K. Petersen
2003-10-17 18:37 ` Christoph Hellwig
2003-10-17 18:51 ` Martin K. Petersen
2003-10-17 19:22 ` Chen, Kenneth W
2003-10-17 20:33 ` Jesse Barnes
2003-10-20  8:43 ` Jes Sorensen
2003-10-20 15:09 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox