linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Andy Whitcroft <apw@shadowen.org>
Cc: Dave Hansen <haveblue@us.ibm.com>, linux-mm@kvack.org
Subject: Re: [PATCH] Get rid of zone_table
Date: Fri, 15 Sep 2006 10:51:41 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0609151050470.8355@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0609151010520.7975@schroedinger.engr.sgi.com>

Optimize section_to_node_table so that it fits in a cacheline

We change the type of the elements in the section to node table
to u8 if we have less than 256 nodes in the system. That way
we can have up to 128 sections in one cacheline which is all
that is necessary for some 32 bit NUMA platforms like NUMAQ to
keep section_to_node_table in a single cacheline and thus
make page_to_zone as fast or faster than before.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

Index: linux-2.6.18-rc6-mm2/mm/sparse.c
===================================================================
--- linux-2.6.18-rc6-mm2.orig/mm/sparse.c	2006-09-15 12:43:12.000000000 -0500
+++ linux-2.6.18-rc6-mm2/mm/sparse.c	2006-09-15 12:50:20.857430106 -0500
@@ -30,7 +30,11 @@ EXPORT_SYMBOL(mem_section);
  * do a lookup in the section_to_node_table in order to find which
  * node the page belongs to.
  */
-static int section_to_node_table[NR_MEM_SECTIONS];
+#if MAX_NUMNODES <= 256
+static u8 section_to_node_table[NR_MEM_SECTIONS] __cacheline_aligned;
+#else
+static u16 section_to_node_table[NR_MEM_SECTIONS] __cacheline_aligned;
+#endif
 
 extern unsigned long page_to_nid(struct page *page)
 {

--
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>

  reply	other threads:[~2006-09-15 17:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-13 20:44 Christoph Lameter
2006-09-13 20:53 ` Dave Hansen
2006-09-13 21:40   ` Christoph Lameter
2006-09-13 21:47     ` Dave Hansen
2006-09-13 21:54       ` Christoph Lameter
2006-09-13 21:58         ` Dave Hansen
2006-09-13 22:02           ` Christoph Lameter
2006-09-15 13:28       ` Andy Whitcroft
2006-09-15 16:32         ` Dave Hansen
2006-09-15 17:13         ` Christoph Lameter
2006-09-15 17:51           ` Christoph Lameter [this message]
2006-09-14 10:33 ` Andy Whitcroft
2006-09-14 21:46   ` Christoph Lameter
2006-09-15 13:07     ` Andy Whitcroft

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=Pine.LNX.4.64.0609151050470.8355@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=apw@shadowen.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-mm@kvack.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