linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
From: Paul Jackson <pj@sgi.com>
To: akpm@osdl.org
Cc: nickpiggin@yahoo.com.au, ak@suse.de, linux-mm@kvack.org,
	holt@sgi.com, mbligh@google.com, rientjes@google.com,
	rohitseth@google.com, menage@google.com,
	Paul Jackson <pj@sgi.com>,
	clameter@sgi.com
Subject: [PATCH 2/2] memory page_alloc zonelist caching reorder structure
Date: Thu, 19 Oct 2006 03:10:50 -0700	[thread overview]
Message-ID: <20061019101050.6074.75441.sendpatchset@sam.engr.sgi.com> (raw)

Rearrange the struct members in the 'struct zonelist_cache'
structure, so as to put the readonly (once initialized)
z_to_n[] array first, where it will come right after the
zones[] array in struct zonelist.

This pretty much eliminates the chance that the two frequently
written elements of 'struct zonelist_cache', the fullzones
bitmap and last_full_zap times, will end up on the same cache
line as the performance sensitive, frequently read, never
(after init) written zones[] array.

Keeping frequently written data off frequently read cache
lines is good for performance.

Thanks to Rohit Seth for the suggestion.

Signed-off-by: Paul Jackson <pj@sgi.com>

---

 include/linux/mmzone.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- 2.6.19-rc2-mm1.orig/include/linux/mmzone.h	2006-10-19 02:46:58.000000000 -0700
+++ 2.6.19-rc2-mm1/include/linux/mmzone.h	2006-10-19 02:49:25.000000000 -0700
@@ -374,8 +374,8 @@ struct zone {
 
 
 struct zonelist_cache {
-	DECLARE_BITMAP(fullzones, MAX_ZONES_PER_ZONELIST);	/* zone full? */
 	unsigned short z_to_n[MAX_ZONES_PER_ZONELIST];		/* zone->nid */
+	DECLARE_BITMAP(fullzones, MAX_ZONES_PER_ZONELIST);	/* zone full? */
 	unsigned long last_full_zap;		/* when last zap'd (jiffies) */
 };
 #else

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

--
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-10-19 10:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20061019101050.6074.75441.sendpatchset@sam.engr.sgi.com \
    --to=pj@sgi.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=holt@sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@google.com \
    --cc=menage@google.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=rientjes@google.com \
    --cc=rohitseth@google.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