mm: get 7% more pages in a pagevec
PATCH 59/119 mm: get 7% more pages in a pagevec
From: Matthew Wilcox <[email protected]>
Subject: mm: get 7% more pages in a pagevec
We don't have to use an entire 'long' for the number of elements in the pagevec; we know it's a number between 0 and 14 (now 15). So we can store it in a char, and then the bool packs next to it and we still have two or six bytes of padding for more elements in the header. That gives us space to cram in an extra page.
Signed-off-by Matthew Wilcox <[email protected]>
Acked-by Michal Hocko <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
include/linux/pagevec.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/pagevec.h renamed from include/linux/pagevec.h~get-7%-more-pages-in-a-pagevec +3 -3
@@ -9,14 +9,14 @@#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 + header align the pagevec structure to a power of two */ +#define PAGEVEC_SIZE 15struct page ;struct address_space ;struct pagevec { -unsigned long nr; +unsigned char nr;bool percpu_pvec_drained;struct page *pages[PAGEVEC_SIZE ]; };
_