From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: akpm@osdl.org, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] change pagevec counters back to unsigned long and cacheline align
Date: Mon, 18 Oct 2004 13:04:44 -0200 [thread overview]
Message-ID: <20041018150444.GD2403@logos.cnet> (raw)
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>
reply other threads:[~2004-10-18 15:04 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=20041018150444.GD2403@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--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