diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-10-31 04:09:13 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-31 04:09:13 -0800 |
| commit | 228c3d15a7020c3587a2c356657099c73f9eb76b (patch) | |
| tree | cea6db413da503b5777aa9d8a35f6092e8125d33 /include/linux | |
| parent | e735f278e3e8889995269ccac8e9f67c49c74040 (diff) | |
[PATCH] lru_add_active(): for starting pages on the active list
This is the first in a series of patches which tune up the 2.5
performance under heavy swap loads.
Throughput on stupid swapstormy tests is increased by 1.5x to 3x.
Still about 20% behind 2.4 with multithreaded tests. That is not
easily fixable - the virtual scan tends to apply a form of load
control: particular processes are heavily swapped out so the others can
get ahead. With 2.5 all processes make very even progress and much
more swapping is needed. It's on par with 2.4 for single-process
swapstorms.
In this patch:
The code which tries to start mapped pages out on the active list
doesn't work very well. It uses an "is it mapped into pagetables"
test. Which doesn't work for, say, swap readahead pages. They are not
mapped into pagetables when they are spilled onto the LRU.
So create a new `lru_cache_add_active()' function for deferred addition
of pages to their active list.
Also move mark_page_accessed() from filemap.c to swap.c where all
similar functions live. And teach it to not try to move pages which
are in the deferred-addition list onto the active list. That won't
work, and it's bogusly clearing PageReferenced in that case.
The deferred-addition lists are a pest. But lru_cache_add used to be
really expensive in sime workloads on some machines. Must persist.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pagevec.h | 1 | ||||
| -rw-r--r-- | include/linux/swap.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index d149e0688b1e..3905ac62f6ee 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h @@ -20,6 +20,7 @@ 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 lru_add_drain(void); void pagevec_deactivate_inactive(struct pagevec *pvec); void pagevec_strip(struct pagevec *pvec); diff --git a/include/linux/swap.h b/include/linux/swap.h index 4457c1dec40b..596d037cddea 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -156,7 +156,7 @@ extern int FASTCALL(page_over_rsslimit(struct page *)); /* linux/mm/swap.c */ extern void FASTCALL(lru_cache_add(struct page *)); - +extern void FASTCALL(lru_cache_add_active(struct page *)); extern void FASTCALL(activate_page(struct page *)); extern void swap_setup(void); |
