aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Jackson <pj@sgi.com>2006-12-06 23:31:49 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:20 -0500
commit7253f4ef04b1cd138baf2b29a95473743ac0a307 (patch)
tree5883e6773a3cdad31992539ba3ad989d2566a041
parent9276b1bc96a132f4068fdee00983c532f43d3a26 (diff)
[PATCH] memory page_alloc zonelist caching reorder structure
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> Cc: Rohit Seth <rohitseth@google.com> Cc: Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/mmzone.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 09bf9d8d7b72..da6002dec205 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -352,8 +352,8 @@ struct zone {
352 352
353 353
354struct zonelist_cache { 354struct zonelist_cache {
355 DECLARE_BITMAP(fullzones, MAX_ZONES_PER_ZONELIST); /* zone full? */
356 unsigned short z_to_n[MAX_ZONES_PER_ZONELIST]; /* zone->nid */ 355 unsigned short z_to_n[MAX_ZONES_PER_ZONELIST]; /* zone->nid */
356 DECLARE_BITMAP(fullzones, MAX_ZONES_PER_ZONELIST); /* zone full? */
357 unsigned long last_full_zap; /* when last zap'd (jiffies) */ 357 unsigned long last_full_zap; /* when last zap'd (jiffies) */
358}; 358};
359#else 359#else