mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ravikiran G Thirumalai <kiran@scalex86.org>
To: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, discuss@x86-64.org,
	shai@scalex86.org
Subject: [patch 1/3] x86_64: Node local PDA -- early cpu_to_node
Date: Fri, 2 Dec 2005 00:10:28 -0800	[thread overview]
Message-ID: <20051202081028.GA5312@localhost.localdomain> (raw)

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();
 

             reply	other threads:[~2005-12-02  8:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-02  8:10 Ravikiran G Thirumalai [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051202081028.GA5312@localhost.localdomain \
    --to=kiran@scalex86.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shai@scalex86.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome