* [PATCH] change pagevec counters back to unsigned long and cacheline align
@ 2004-10-18 15:04 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2004-10-18 15:04 UTC (permalink / raw)
To: akpm, linux-mm; +Cc: linux-kernel
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.
--- rc4-mm1.orig/include/linux/pagevec.h 2004-10-15 01:02:39.209481760 -0300
+++ rc4-mm1/include/linux/pagevec.h 2004-10-15 01:17:58.853674592 -0300
@@ -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];
};
----- End forwarded message -----
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] change pagevec counters back to unsigned long and cacheline align
@ 2004-10-18 15:04 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2004-10-18 15:04 UTC (permalink / raw)
To: akpm, linux-mm; +Cc: linux-kernel
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.
--- rc4-mm1.orig/include/linux/pagevec.h 2004-10-15 01:02:39.209481760 -0300
+++ rc4-mm1/include/linux/pagevec.h 2004-10-15 01:17:58.853674592 -0300
@@ -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];
};
----- End forwarded message -----
--
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:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-19 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-18 15:04 [PATCH] change pagevec counters back to unsigned long and cacheline align Marcelo Tosatti
2004-10-18 15:04 ` Marcelo Tosatti
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.