mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] add an iterator index in struct pagevec
@ 2006-12-05  5:21 Chen, Kenneth W
  2006-12-05  5:45 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Chen, Kenneth W @ 2006-12-05  5:21 UTC (permalink / raw)
  To: 'Andrew Morton'; +Cc: linux-kernel

pagevec is never expected to be more than PAGEVEC_SIZE, I think a
unsigned char is enough to count them.  This patch makes nr, cold
to be unsigned char and also adds an iterator index. With that,
the size can be even bumped up by 1 to 15.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>


diff -Nurp linux-2.6.19/include/linux/pagevec.h linux-2.6.19.ken/include/linux/pagevec.h
--- linux-2.6.19/include/linux/pagevec.h	2006-11-29 13:57:37.000000000 -0800
+++ linux-2.6.19.ken/include/linux/pagevec.h	2006-12-04 19:18:21.000000000 -0800
@@ -8,15 +8,16 @@
 #ifndef _LINUX_PAGEVEC_H
 #define _LINUX_PAGEVEC_H
 
-/* 14 pointers + two long's align the pagevec structure to a power of two */
-#define PAGEVEC_SIZE	14
+/* 15 pointers + 3 char's align the pagevec structure to a power of two */
+#define PAGEVEC_SIZE	15
 
 struct page;
 struct address_space;
 
 struct pagevec {
-	unsigned long nr;
-	unsigned long cold;
+	unsigned char nr;
+	unsigned char cold;
+	unsigned char idx;
 	struct page *pages[PAGEVEC_SIZE];
 };
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-05  6:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-05  5:21 [patch] add an iterator index in struct pagevec Chen, Kenneth W
2006-12-05  5:45 ` Andrew Morton
2006-12-05  6:21   ` Chen, Kenneth W

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®