public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, gh@us.ibm.com
Subject: Re: 2.5.52-mjb1 (scalability / NUMA patchset)
Date: Tue, 17 Dec 2002 09:49:58 -0800	[thread overview]
Message-ID: <20021217174958.GY2690@holomorphy.com> (raw)
In-Reply-To: <568990000.1040112629@titus>

On Tue, Dec 17, 2002 at 12:10:29AM -0800, Martin J. Bligh wrote:
> The patchset contains mainly scalability and NUMA stuff, and
> anything else that stops things from irritating me. It's meant
> to be pretty stable, not so much a testing ground for new stuff.
> I'd be very interested in feedback from other people running
> large SMP or NUMA boxes.
> http://www.aracnet.com/~fletch/linux/2.5.52/patch-2.5.52-mjb1.bz2


pfn_to_nid() got lots of icache misses. Try using a macro.

 arch/i386/kernel/i386_ksyms.c |    1 -
 arch/i386/kernel/numaq.c      |   15 ++-------------
 include/asm-i386/numaq.h      |    3 ++-
 3 files changed, 4 insertions(+), 15 deletions(-)


diff -urpN linux-2.5.52-mm1/arch/i386/kernel/i386_ksyms.c mm1-2.5.52-1/arch/i386/kernel/i386_ksyms.c
--- linux-2.5.52-mm1/arch/i386/kernel/i386_ksyms.c	2002-12-16 19:29:45.000000000 -0800
+++ mm1-2.5.52-1/arch/i386/kernel/i386_ksyms.c	2002-12-17 08:47:25.000000000 -0800
@@ -67,7 +67,6 @@ EXPORT_SYMBOL(EISA_bus);
 EXPORT_SYMBOL(MCA_bus);
 #ifdef CONFIG_DISCONTIGMEM
 EXPORT_SYMBOL(node_data);
-EXPORT_SYMBOL(pfn_to_nid);
 #endif
 #ifdef CONFIG_X86_NUMAQ
 EXPORT_SYMBOL(xquad_portio);
diff -urpN linux-2.5.52-mm1/arch/i386/kernel/numaq.c mm1-2.5.52-1/arch/i386/kernel/numaq.c
--- linux-2.5.52-mm1/arch/i386/kernel/numaq.c	2002-12-15 18:08:13.000000000 -0800
+++ mm1-2.5.52-1/arch/i386/kernel/numaq.c	2002-12-17 08:51:44.000000000 -0800
@@ -27,6 +27,7 @@
 #include <linux/mm.h>
 #include <linux/bootmem.h>
 #include <linux/mmzone.h>
+#include <linux/module.h>
 #include <asm/numaq.h>
 
 /* These are needed before the pgdat's are created */
@@ -82,19 +83,7 @@ static void __init smp_dump_qct(void)
  * physnode_map[8- ] = -1;
  */
 int physnode_map[MAX_ELEMENTS] = { [0 ... (MAX_ELEMENTS - 1)] = -1};
-
-#define PFN_TO_ELEMENT(pfn) (pfn / PAGES_PER_ELEMENT)
-#define PA_TO_ELEMENT(pa) (PFN_TO_ELEMENT(pa >> PAGE_SHIFT))
-
-int pfn_to_nid(unsigned long pfn)
-{
-	int nid = physnode_map[PFN_TO_ELEMENT(pfn)];
-
-	if (nid == -1)
-		BUG(); /* address is not present */
-
-	return nid;
-}
+EXPORT_SYMBOL(physnode_map);
 
 /*
  * for each node mark the regions
diff -urpN linux-2.5.52-mm1/include/asm-i386/numaq.h mm1-2.5.52-1/include/asm-i386/numaq.h
--- linux-2.5.52-mm1/include/asm-i386/numaq.h	2002-12-15 18:08:09.000000000 -0800
+++ mm1-2.5.52-1/include/asm-i386/numaq.h	2002-12-17 08:45:19.000000000 -0800
@@ -38,10 +38,11 @@
 #define MAX_ELEMENTS 256
 #define PAGES_PER_ELEMENT (16777216/256)
 
+extern int physnode_map[];
+#define pfn_to_nid(pfn)	({ physnode_map[(pfn) / PAGES_PER_ELEMENT]; })
 #define pfn_to_pgdat(pfn) NODE_DATA(pfn_to_nid(pfn))
 #define PHYSADDR_TO_NID(pa) pfn_to_nid(pa >> PAGE_SHIFT)
 #define MAX_NUMNODES		8
-extern int pfn_to_nid(unsigned long);
 extern void get_memcfg_numaq(void);
 #define get_memcfg_numa() get_memcfg_numaq()
 

  parent reply	other threads:[~2002-12-17 17:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-26  0:30 2.5.47-mjb3 (scalability / NUMA patchset) Martin J. Bligh
2002-12-09  6:11 ` 2.5.50-mjb1 " Martin J. Bligh
2002-12-09  9:06   ` William Lee Irwin III
2002-12-10  6:42   ` 2.5.50-mjb2 " Martin J. Bligh
2002-12-10  6:49     ` William Lee Irwin III
2002-12-17  8:10     ` 2.5.52-mjb1 " Martin J. Bligh
2002-12-17 15:57       ` William Lee Irwin III
2002-12-17 17:49       ` William Lee Irwin III [this message]
2002-12-17 19:31         ` Martin J. Bligh
2002-12-24  8:11       ` 2.5.53-mjb1 " Martin J. Bligh
2003-01-03  7:37         ` 2.5.54-mjb1 " Martin J. Bligh
2003-01-06  2:58           ` 2.5.54-mjb2 " Martin J. Bligh
2003-01-09  8:31             ` 2.5.54-mjb3 " Martin J. Bligh
2003-01-10  7:21               ` 2.5.55-mjb1 " Martin J. Bligh
2003-01-14  8:05                 ` 2.5.58-mjb1 " Martin J. Bligh
2003-01-17  7:11                   ` 2.5.58-mjb2 " Martin J. Bligh
2003-01-17  9:49                     ` William Lee Irwin III
2003-01-17 15:44                       ` Martin J. Bligh
2003-01-21  8:19                     ` 2.5.59-mjb1 " Martin J. Bligh
2003-01-29  2:16                       ` 2.5.59-mjb2 " Martin J. Bligh
2003-02-03  2:08                         ` 2.5.59-mjb3 " Martin J. Bligh
2003-02-03 18:33                           ` Mark Haverkamp
2003-02-03 18:42                             ` Martin J. Bligh
2003-02-03 18:55                               ` Mark Haverkamp
2003-02-03 19:03                                 ` Martin J. Bligh
2003-02-03 19:35                                   ` Mark Haverkamp
2003-02-04  8:59                                 ` Martin J. Bligh
2003-02-07  7:37                           ` 2.5.59-mjb4 " Martin J. Bligh
2003-02-09  3:26                             ` 2.5.59-mjb5 " Martin J. Bligh
2003-02-11 18:03                               ` 2.5.59-mjb6 " Martin J. Bligh

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=20021217174958.GY2690@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=gh@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    /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