embryotic page ageing with lists
Subsystems (5)
PATCH 1/1 embryotic page ageing with lists
Hi,
This is a embryotic, but with heart beats, patch of page ageing for test3-pre6.
Features:
* does NOT add any field in page structure.
* round robin lists is used to simulate ageing.
* referenced pages are moved 5 steps forward.
* non freeable, tryagain, are moved 3 steps forward.
* new pages are inserted 2 steps forward.
* no pages are moved backward or to currently scanned.
Future work:
* trim offsets / size / priority
* remove code that unnecessary sets page as referenced (riel?)
* add more offsets depending on why the page could not be freed.
* split pagemap_lru_lock (if wanted on SMP)
* move pages of zones with pressure less forward...
* ...
/RogerL
--
Home page:
http://www.norran.net/nra02596/
mm/page_alloc.c renamed from mm/page_alloc.c.orig +1 -1
@@ -499,7 +499,7 @@ void __init free_area_init_core(int nid, freepages.min += i; freepages.low += i *2 ; freepages.high += i *3 ; -memlist_init (&lru_cache); +init_lru_cache ();/* * Some architectures (with lots of mem and discontinous memory
include/linux/mm.h renamed from include/linux/mm.h.orig +2 -1
@@ -15,7 +15,7 @@ extern unsigned long max_mapnr;extern unsigned long num_physpages;extern void * high_memory;extern int page_cluster; -extern struct list_head lru_cache; +extern struct list_head *lru_cache_insert;#include <asm/page.h> #include <asm/pgtable.h>
@@ -456,6 +456,7 @@ struct zone_t;/* filemap.c */ extern void remove_inode_page (struct page *);extern unsigned long page_unuse (struct page *); +extern void init_lru_cache (void );extern int shrink_mmap (int ,int );extern void truncate_inode_pages (struct address_space *,loff_t );
include/linux/swap.h renamed from include/linux/swap.h.orig +1 -1
@@ -166,7 +166,7 @@ extern spinlock_t pagemap_lru_lock;#define lru_cache_add (page) \ do { \ spin_lock(&pagemap_lru_lock); \ - list_add(&(page)->lru, &lru_cache); \ + list_add(&(page)->lru, lru_cache_insert); \ nr_lru_pages++; \ spin_unlock(&pagemap_lru_lock); \ } while (0)
mm/filemap.c renamed from mm/filemap.c.orig +51 -4
91 lines not on this page · raw message