summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMarcelo Tosatti <marcelo.tosatti@cyclades.com>2004-10-25 04:14:40 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-25 04:14:40 -0700
commit6140f8a54db42320b1d05ce2680b5619210b88ad (patch)
tree7f729216e651d445437bfd0e68e7296ea0dba5fc /include/linux
parentb5e319c288559cdfe577ddbbcad3646b9aa6ee0b (diff)
[PATCH] Change pagevec counters back to unsigned long and cacheline align
Change pagevec "nr" and "cold" back to "unsigned long", because <4 byte accesses can be slow on architectures < Pentium III (additional "data16" operand on instruction). This still honours the cacheline alignment, making the size of "pagevec" structure a power of two (either 64 or 128 bytes). Haven't been able to see any significant change on performance on my limited testing. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pagevec.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index 39cca92a8d63..def32c5715be 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -5,14 +5,15 @@
* pages. A pagevec is a multipage container which is used for that.
*/
-#define PAGEVEC_SIZE 15
+/* 14 pointers + two long's align the pagevec structure to a power of two */
+#define PAGEVEC_SIZE 14
struct page;
struct address_space;
struct pagevec {
- unsigned short nr;
- unsigned short cold;
+ unsigned long nr;
+ unsigned long cold;
struct page *pages[PAGEVEC_SIZE];
};