public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/3] x86_64: Node local PDA -- early cpu_to_node
@ 2005-12-02  8:10 Ravikiran G Thirumalai
  2005-12-02  8:16 ` [patch 2/3] x86_64: Node local PDA -- Use macros to access cpu_pda Ravikiran G Thirumalai
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Ravikiran G Thirumalai @ 2005-12-02  8:10 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Andrew Morton, linux-kernel, discuss, shai

The following patchset is to allocate node local memory for the x86_64 
processor PDA.

Andrew, can you pls include this in -mm for testing?

Thanks,
Kiran

---

Patch enables early initialization of cpu_to_node. apicid_to_node is built by 
reading the SRAT table, from acpi_numa_init, and x86_cpu_to_apicid is built 
by parsing the ACPI MADT table, from acpi_boot_init. Combine these two tables 
and setup cpu_to_node.  Thanks to Andi for suggesting this.

Early initialization helps the static per-cpu areas in getting pages from 
correct node, and sets up cpu_to_node early for node local PDA allocations.

Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>

Index: linux-2.6.15-rc3/arch/x86_64/kernel/setup.c
===================================================================
--- linux-2.6.15-rc3.orig/arch/x86_64/kernel/setup.c	2005-11-30 11:32:53.000000000 -0800
+++ linux-2.6.15-rc3/arch/x86_64/kernel/setup.c	2005-11-30 16:49:19.000000000 -0800
@@ -528,6 +528,7 @@
 void __init setup_arch(char **cmdline_p)
 {
 	unsigned long kernel_end;
+	unsigned i;
 
  	ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
  	drive_info = DRIVE_INFO;
@@ -669,6 +670,15 @@
 	acpi_boot_init();
 #endif
 
+#ifdef CONFIG_ACPI_NUMA
+ 	/*
+ 	 * Setup cpu_to_node using the SRAT lapcis & ACPI MADT table
+ 	 * info.
+ 	 */
+ 	for (i = 0; i < NR_CPUS; i++)
+ 		cpu_to_node[i] = apicid_to_node[x86_cpu_to_apicid[i]];
+#endif
+
 #ifdef CONFIG_X86_LOCAL_APIC
 	/*
 	 * get boot-time SMP configuration:
@@ -687,12 +697,9 @@
 
 	request_resource(&iomem_resource, &video_ram_resource);
 
-	{
-	unsigned i;
 	/* request I/O space for devices used on all i[345]86 PCs */
 	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
 		request_resource(&ioport_resource, &standard_io_resources[i]);
-	}
 
 	e820_setup_gap();
 

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

end of thread, other threads:[~2005-12-02 23:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-02  8:10 [patch 1/3] x86_64: Node local PDA -- early cpu_to_node Ravikiran G Thirumalai
2005-12-02  8:16 ` [patch 2/3] x86_64: Node local PDA -- Use macros to access cpu_pda Ravikiran G Thirumalai
2005-12-02  8:23 ` [patch 3/3] x86_64: Node local PDA -- allocate node local memory for pda Ravikiran G Thirumalai
2005-12-02  8:54   ` Eric Dumazet
2005-12-02 18:24     ` [discuss] " Ravikiran G Thirumalai
2005-12-02  9:05   ` Andrew Morton
2005-12-02 10:36     ` [RFC] NUMA aware kthread_create() ? Eric Dumazet
2005-12-02 12:32       ` [discuss] " Andi Kleen
2005-12-02 11:47   ` [patch 3/3] x86_64: Node local PDA -- allocate node local memory for pda Andi Kleen
2005-12-02 20:02     ` Ravikiran G Thirumalai
2005-12-02 22:41       ` Andi Kleen
2005-12-02 11:43 ` [patch 1/3] x86_64: Node local PDA -- early cpu_to_node Andi Kleen
2005-12-02 22:51   ` [discuss] " Ravikiran G Thirumalai
2005-12-02 23:02     ` Andi Kleen
2005-12-02 23:43       ` Ravikiran G Thirumalai
2005-12-02 23:48         ` Andi Kleen

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