swap: use an array for the LRU pagevecs
Turn the pagevecs into an array just like the LRUs. This significantly cleans up the source code and reduces the size of the kernel by about 13kB after all the LRU lists have been created further down in the split VM patch series. Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
b69408e88b
commit
f04e9ebbe4
@ -23,8 +23,7 @@ struct pagevec {
|
||||
void __pagevec_release(struct pagevec *pvec);
|
||||
void __pagevec_release_nonlru(struct pagevec *pvec);
|
||||
void __pagevec_free(struct pagevec *pvec);
|
||||
void __pagevec_lru_add(struct pagevec *pvec);
|
||||
void __pagevec_lru_add_active(struct pagevec *pvec);
|
||||
void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru);
|
||||
void pagevec_strip(struct pagevec *pvec);
|
||||
unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping,
|
||||
pgoff_t start, unsigned nr_pages);
|
||||
@ -81,6 +80,16 @@ static inline void pagevec_free(struct pagevec *pvec)
|
||||
__pagevec_free(pvec);
|
||||
}
|
||||
|
||||
static inline void __pagevec_lru_add(struct pagevec *pvec)
|
||||
{
|
||||
____pagevec_lru_add(pvec, LRU_INACTIVE);
|
||||
}
|
||||
|
||||
static inline void __pagevec_lru_add_active(struct pagevec *pvec)
|
||||
{
|
||||
____pagevec_lru_add(pvec, LRU_ACTIVE);
|
||||
}
|
||||
|
||||
static inline void pagevec_lru_add(struct pagevec *pvec)
|
||||
{
|
||||
if (pagevec_count(pvec))
|
||||
|
Reference in New Issue
Block a user